Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions btcpay-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ backup_dir="$docker_dir/volumes/backup_datadir/_data"
postgres_dump_path="$docker_dir/$postgres_dump_name"
backup_path="$backup_dir/backup.tar.gz"

# Backup with custom file name and timestamp:
if [ "$BACKUP_TIMESTAMP" == true ]; then
timestamp=$(date "+%Y%m%d-%H%M%S")
backup_path="$backup_dir/$timestamp-backup.tar.gz"
fi

# ensure backup dir exists
if [ ! -d "$backup_dir" ]; then
mkdir -p $backup_dir
Expand Down