From c0d86cb0a156ecb6a67f83250cd2cdeb42d29853 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sat, 6 Mar 2021 20:06:57 +0100 Subject: [PATCH] Mount backup directory + export PGPASSWORD --- app/backup/build/backup-matrix/do_backup.sh | 2 +- app/backup/deploy/backup-manual.hcl | 3 ++- 2 files changed, 3 insertions(+), 2 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" diff --git a/app/backup/deploy/backup-manual.hcl b/app/backup/deploy/backup-manual.hcl index 2e6ffef..1e8cab5 100644 --- a/app/backup/deploy/backup-manual.hcl +++ b/app/backup/deploy/backup-manual.hcl @@ -11,7 +11,8 @@ job "backup_manual" { volumes = [ "secrets/id_ed25519:/root/.ssh/id_ed25519", "secrets/id_ed25519.pub:/root/.ssh/id_ed25519.pub", - "secrets/known_hosts:/root/.ssh/known_hosts" + "secrets/known_hosts:/root/.ssh/known_hosts", + "/mnt/glusterfs/chat/matrix/synapse/media:/mnt/glusterfs/chat/matrix/synapse/media" ] network_mode = "host" }