add BACKUP_TIMESTAMP to btcpay-backup.sh#783
Open
coinforensics wants to merge 1 commit intobtcpayserver:masterfrom
Open
add BACKUP_TIMESTAMP to btcpay-backup.sh#783coinforensics wants to merge 1 commit intobtcpayserver:masterfrom
coinforensics wants to merge 1 commit intobtcpayserver:masterfrom
Conversation
Contributor
|
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. |
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). |
Contributor
|
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 |
This comment was marked as spam.
This comment was marked as spam.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.