forked from Deuxfleurs/infrastructure
Mount backup directory + export PGPASSWORD
This commit is contained in:
parent
d1a4ed0f79
commit
c0d86cb0a1
2 changed files with 3 additions and 2 deletions
|
@ -15,7 +15,7 @@ EOF
|
||||||
|
|
||||||
echo "export sql"
|
echo "export sql"
|
||||||
# note, -Fc means that postgresql compresses the output
|
# 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 | \
|
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)" | \
|
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"
|
||||||
|
|
|
@ -11,7 +11,8 @@ job "backup_manual" {
|
||||||
volumes = [
|
volumes = [
|
||||||
"secrets/id_ed25519:/root/.ssh/id_ed25519",
|
"secrets/id_ed25519:/root/.ssh/id_ed25519",
|
||||||
"secrets/id_ed25519.pub:/root/.ssh/id_ed25519.pub",
|
"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"
|
network_mode = "host"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue