backup mjolnir data

This commit is contained in:
Daniel Micay 2023-11-04 15:12:45 -04:00
parent d6cee6024c
commit dba2c3c26d
2 changed files with 2 additions and 0 deletions

View file

@ -11,6 +11,7 @@ ssh $remote "mkdir local-backup"
ssh $remote "mkdir local-backup/$timestamp"
ssh $remote "pg_dumpall -U postgres > local-backup/$timestamp/all_databases.sql"
ssh $remote "cp -r /etc/synapse local-backup/$timestamp/synapse"
ssh $remote "cp -r /var/lib/mjolnir local-backup/$timestamp/mjolnir"
ssh $remote "tar -cC local-backup $timestamp | zstd -9 | age -r \$(cat backup-public-key.txt) -o local-backup/$timestamp.tar.zst.age"
rsync -v --fsync --preallocate $remote:./local-backup/$timestamp.tar.zst.age backup/