mirror of
https://github.com/GrapheneOS/matrix.grapheneos.org.git
synced 2025-08-24 13:29:41 -04:00
remove backup intermediates when finished
This commit is contained in:
parent
39711a6085
commit
c31759b483
2 changed files with 4 additions and 0 deletions
|
@ -13,3 +13,5 @@ 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 /etc/synapse local-backup/$timestamp/synapse"
|
||||||
ssh $remote "tar -cC local-backup $timestamp | zstd -9 | age -r \$(cat backup-public-key.txt) -o local-backup/$timestamp.tar.zst.age"
|
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 $remote:./local-backup/$timestamp.tar.zst.age backup/
|
rsync -v $remote:./local-backup/$timestamp.tar.zst.age backup/
|
||||||
|
|
||||||
|
ssh $remote "rm -rf local-backup"
|
||||||
|
|
|
@ -11,3 +11,5 @@ pg_dumpall -U postgres > remote-backup/$timestamp/all_databases.sql
|
||||||
cp -r /etc/synapse remote-backup/$timestamp/synapse
|
cp -r /etc/synapse remote-backup/$timestamp/synapse
|
||||||
tar -cC remote-backup $timestamp | zstd -9 | age -r $(cat backup-public-key.txt) -o remote-backup/$timestamp.tar.zst.age
|
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/
|
sshpass -f cloud-archive-password.txt rsync -v ./remote-backup/$timestamp.tar.zst.age pca@gateways.storage.gra.cloud.ovh.net:backup/
|
||||||
|
|
||||||
|
rm -rf remote-backup
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue