Target a replicated server and not the main one

This commit is contained in:
Quentin 2021-04-14 19:10:46 +02:00
parent b851ca0c95
commit 9dfff86cd2
Signed by untrusted user: quentin
GPG key ID: A98E9B769E4FF428

View file

@ -16,7 +16,7 @@ EOF
echo "export sql" echo "export sql"
# note, -Fc means that postgresql compresses the output # note, -Fc means that postgresql compresses the output
export PGPASSWORD=$MATRIX_PSQL_PWD export PGPASSWORD=$MATRIX_PSQL_PWD
pg_dump -v -Fc -U $MATRIX_PSQL_USER -h psql-proxy.service.2.cluster.deuxfleurs.fr $MATRIX_PSQL_DB | \ pg_dump -v -Fc -U $MATRIX_PSQL_USER -h datura.machine.deuxfleurs.fr -p 5433 $MATRIX_PSQL_DB | \
age -r "$(cat /root/.ssh/id_ed25519.pub)" | \ age -r "$(cat /root/.ssh/id_ed25519.pub)" | \
ssh backuphost "cat > $TARGET_SSH_DIR/matrix/db-$(date --iso-8601=minute).gz.age" ssh backuphost "cat > $TARGET_SSH_DIR/matrix/db-$(date --iso-8601=minute).gz.age"