Skip to content

Commit

Permalink
use single thread mode for zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Nov 16, 2023
1 parent 84f6fbb commit 12369a7
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 @@ -11,7 +11,7 @@ ssh $remote "mkdir local-backup"
ssh $remote "mkdir local-backup/$timestamp"
ssh $remote "sqlite3 attestation.db \".backup local-backup/$timestamp/attestation.db\""
ssh $remote "sqlite3 samples.db \".backup local-backup/$timestamp/samples.db\""
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 --single-thread -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/

ssh $remote "rm -rf local-backup"
2 changes: 1 addition & 1 deletion remote-backup
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mkdir remote-backup
mkdir remote-backup/$timestamp
sqlite3 attestation.db ".backup remote-backup/$timestamp/attestation.db"
sqlite3 samples.db ".backup remote-backup/$timestamp/samples.db"
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 --single-thread -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/

rm -rf remote-backup

0 comments on commit 12369a7

Please sign in to comment.