chore(cassandra): retry db copy with quiesced target
This commit is contained in:
parent
618ef4b941
commit
bbd583848d
@ -7,7 +7,7 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
app: cassandra-backend
|
app: cassandra-backend
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 0
|
||||||
revisionHistoryLimit: 2
|
revisionHistoryLimit: 2
|
||||||
strategy:
|
strategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
name: cassandra-db-copy-from-veles-2
|
name: cassandra-db-copy-from-veles-3
|
||||||
namespace: cassandra
|
namespace: cassandra
|
||||||
spec:
|
spec:
|
||||||
suspend: false
|
suspend: false
|
||||||
@ -68,7 +68,9 @@ spec:
|
|||||||
pg_dump --format=custom --no-owner --no-acl \
|
pg_dump --format=custom --no-owner --no-acl \
|
||||||
--dbname="${SOURCE_DATABASE_URL}" \
|
--dbname="${SOURCE_DATABASE_URL}" \
|
||||||
--file="${dump_path}"
|
--file="${dump_path}"
|
||||||
pg_restore --clean --if-exists --no-owner --no-acl \
|
psql -X --set=ON_ERROR_STOP=1 --dbname="${TARGET_DATABASE_URL}" \
|
||||||
|
--command="DROP SCHEMA IF EXISTS public CASCADE; CREATE SCHEMA public; GRANT ALL ON SCHEMA public TO cassandra; GRANT ALL ON SCHEMA public TO public;"
|
||||||
|
pg_restore --no-owner --no-acl \
|
||||||
--dbname="${TARGET_DATABASE_URL}" \
|
--dbname="${TARGET_DATABASE_URL}" \
|
||||||
"${dump_path}"
|
"${dump_path}"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user