aboutsummaryrefslogtreecommitdiff
path: root/app/backup/build
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-03-06 20:06:57 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-03-06 20:06:57 +0100
commitc0d86cb0a156ecb6a67f83250cd2cdeb42d29853 (patch)
tree147a453aa177a33dadd18c098931bfc39e46de1c /app/backup/build
parentd1a4ed0f7918005dc8972a83a919b99616f79112 (diff)
downloadinfrastructure-c0d86cb0a156ecb6a67f83250cd2cdeb42d29853.tar.gz
infrastructure-c0d86cb0a156ecb6a67f83250cd2cdeb42d29853.zip
Mount backup directory + export PGPASSWORD
Diffstat (limited to 'app/backup/build')
-rwxr-xr-xapp/backup/build/backup-matrix/do_backup.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/backup/build/backup-matrix/do_backup.sh b/app/backup/build/backup-matrix/do_backup.sh
index d7dd9f2..9f37fea 100755
--- a/app/backup/build/backup-matrix/do_backup.sh
+++ b/app/backup/build/backup-matrix/do_backup.sh
@@ -15,7 +15,7 @@ EOF
echo "export sql"
# note, -Fc means that postgresql compresses the output
-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 | \
age -r "$(cat /root/.ssh/id_ed25519.pub)" | \
ssh backuphost "cat > $TARGET_SSH_DIR/matrix/db-$(date --iso-8601=minute).gz.age"