Skip to content

Commit

Permalink
rm db.dump.gpg in case of error (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
N1ades authored Aug 10, 2023
1 parent 2564496 commit aca41c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ s3_uri_base="s3://${S3_BUCKET}/${S3_PREFIX}/${POSTGRES_DATABASE}_${timestamp}.du

if [ -n "$PASSPHRASE" ]; then
echo "Encrypting backup..."
rm -f db.dump.gpg
gpg --symmetric --batch --passphrase "$PASSPHRASE" db.dump
rm db.dump
local_file="db.dump.gpg"
Expand Down

0 comments on commit aca41c2

Please sign in to comment.