1
0
mirror of https://github.com/garraflavatra/docker-volume-s3-backup.git synced 2025-05-17 05:14:37 +00:00

rm db.dump.gpg in case of error (#36)

This commit is contained in:
MaxMls 2023-08-10 18:17:02 +06:00 committed by GitHub
parent 2564496912
commit aca41c2af4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"