use modern option style for tar

This commit is contained in:
Daniel Micay 2022-08-07 08:01:42 -04:00
parent fa61606984
commit be7a6c9187
2 changed files with 2 additions and 2 deletions

View File

@ -11,5 +11,5 @@ 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 -a /etc/synapse local-backup/$timestamp/synapse"
ssh $remote "tar c -C 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/

View File

@ -9,5 +9,5 @@ mkdir remote-backup
mkdir remote-backup/$timestamp
pg_dumpall -U postgres > remote-backup/$timestamp/all_databases.sql
cp -a /etc/synapse remote-backup/$timestamp/synapse
tar c remote-backup/$timestamp | zstd -9 | age -r $(cat backup-public-key.txt) -o remote-backup/$timestamp.tar.zst.age
tar -c 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/