strip path prefix from backup tarballs

This commit is contained in:
Daniel Micay 2022-08-07 08:10:45 -04:00
parent be7a6c9187
commit 84cfdcfe4d

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 -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/