Skip to content

Commit

Permalink
use pg_dump instead of pg_dumpall
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Jul 15, 2023
1 parent fd5c6b0 commit 61d0a89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion local-backup
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ssh $remote "rm -rf local-backup"
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 "pg_dump -U postgres synapse > local-backup/$timestamp/synapse.sql"
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"
rsync -v $remote:./local-backup/$timestamp.tar.zst.age backup/
Expand Down
2 changes: 1 addition & 1 deletion remote-backup
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rm -rf remote-backup
mkdir remote-backup

mkdir remote-backup/$timestamp
pg_dumpall -U postgres > remote-backup/$timestamp/all_databases.sql
pg_dump -U postgres synapse > remote-backup/$timestamp/synapse.sql
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
sshpass -f cloud-archive-password.txt rsync -v ./remote-backup/$timestamp.tar.zst.age [email protected]:backup/
Expand Down

0 comments on commit 61d0a89

Please sign in to comment.