chore(cassandra): retry db copy with quiesced target
This commit is contained in:
parent
618ef4b941
commit
bbd583848d
@ -7,7 +7,7 @@ metadata:
|
||||
labels:
|
||||
app: cassandra-backend
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 0
|
||||
revisionHistoryLimit: 2
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: cassandra-db-copy-from-veles-2
|
||||
name: cassandra-db-copy-from-veles-3
|
||||
namespace: cassandra
|
||||
spec:
|
||||
suspend: false
|
||||
@ -68,7 +68,9 @@ spec:
|
||||
pg_dump --format=custom --no-owner --no-acl \
|
||||
--dbname="${SOURCE_DATABASE_URL}" \
|
||||
--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}" \
|
||||
"${dump_path}"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user