fix(backups): pass --batch so gpg uses the passphrase file

This commit is contained in:
Rudy Celekli
2026-10-18 09:24:35 -04:00
parent 652b2692f8
commit bc10421a52
+2 -2
View File
@@ -331,7 +331,7 @@ backup_database() {
fi
# Encrypt backup
if ! gpg --cipher-algo AES256 --compress-algo 1 --s2k-mode 3 \
if ! gpg --batch --cipher-algo AES256 --compress-algo 1 --s2k-mode 3 \
--s2k-digest-algo SHA512 --s2k-count 65536 --symmetric \
--passphrase-file "$ENCRYPTION_KEY" "$backup_file"; then
handle_error "Database backup encryption failed for $db_name"
@@ -357,7 +357,7 @@ backup_files() {
# Create compressed archive and encrypt
if ! tar -czf - -C "$source_dir" . | \
gpg --cipher-algo AES256 --compress-algo 0 --s2k-mode 3 \
gpg --batch --cipher-algo AES256 --compress-algo 0 --s2k-mode 3 \
--s2k-digest-algo SHA512 --s2k-count 65536 --symmetric \
--passphrase-file "$ENCRYPTION_KEY" \
--output "$backup_file"; then