overwrite gpg encrypted backups for lnbits

This commit is contained in:
counterweight 2025-08-27 15:59:42 +02:00
parent 874ec197fe
commit 201ea8f933
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -58,11 +58,11 @@
# First, create a tar archive of the data directory and pipe it through gpg
echo "Creating backup..."
$SSH_CMD {{ remote_user }}@{{ remote_host }} "cd {{ remote_data_path }} && tar -czf - ." | \
gpg --encrypt --recipient "{{ gpg_recipient }}" --output "$ENCRYPTED_BACKUP"
gpg --batch --yes --encrypt --recipient "{{ gpg_recipient }}" --output "$ENCRYPTED_BACKUP"
# Also backup the .env file separately (smaller, might need quick access)
$SSH_CMD {{ remote_user }}@{{ remote_host }} "cat {{ remote_lnbits_dir }}/.env" | \
gpg --encrypt --recipient "{{ gpg_recipient }}" --output "{{ local_backup_dir }}/lnbits-env-$TIMESTAMP.gpg"
gpg --batch --yes --encrypt --recipient "{{ gpg_recipient }}" --output "{{ local_backup_dir }}/lnbits-env-$TIMESTAMP.gpg"
# Start LNBits service after backup
echo "Starting LNBits service..."