Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add BACKUP_TIMESTAMP to btcpay-backup.sh #783

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

coinforensics
Copy link
Contributor

I migrated the BACKUP_TIMESTAMP functionality to save the backup with datetime as part of the file name from the old backup.sh.

If my change is accepted, I plan to update the documentation to include information on the newly added environment variable.

@dennisreimann
Copy link
Member

I remember we discussed adding those options, but went for the simplest approach which can then be extended with custom wrapper scripts. Free to open it up for dicussion again though.

@coinforensics
Copy link
Contributor Author

I understand and like the importance of maintaining simplicity and consistency in the repository. The BACKUP_TIMESTAMP could provide a more convenient and automated approach to backup management, without the need for custom wrapper scripts (I personally don't like custom scripts in Docker-related processes).

@dennisreimann
Copy link
Member

As said, I'm not opposing oppening it up for discussing — especially since I also use that functionality. Meanwhile, here's my wrapper script:

#!/bin/bash

BACKUP_FILE=/var/lib/docker/volumes/backup_datadir/_data/backup.tar.gz
BACKUP_DIR=/root/backups

cd /root/btcpayserver-docker
./btcpay-backup.sh

file=btcpay-$(date "+%Y%m%d-%H%M%S").tar.gz
cp $BACKUP_FILE $BACKUP_DIR/$file
rm $BACKUP_FILE
find $BACKUP_DIR/btcpay-* -mtime +14 -delete

@ronicmic

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants