mirror of
https://github.com/GrapheneOS/matrix.grapheneos.org.git
synced 2024-10-01 04:45:34 -04:00
backup mjolnir data
This commit is contained in:
parent
d6cee6024c
commit
dba2c3c26d
@ -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/
|
||||
|
||||
|
@ -9,6 +9,7 @@ mkdir remote-backup
|
||||
mkdir remote-backup/$timestamp
|
||||
pg_dumpall -U postgres > remote-backup/$timestamp/all_databases.sql
|
||||
cp -r /etc/synapse remote-backup/$timestamp/synapse
|
||||
cp -r /var/lib/mjolnir remote-backup/$timestamp/mjolnir
|
||||
tar -cC remote-backup $timestamp | zstd -9 | age -r $(cat backup-public-key.txt) -o remote-backup/$timestamp.tar.zst.age
|
||||
sshpass -f cloud-archive-password.txt rsync -v ./remote-backup/$timestamp.tar.zst.age pca@gateways.storage.gra.cloud.ovh.net:backup/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user