From 51d6d32790d6d4b2d2713f6c87c71f688ff2a05c Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 9 Oct 2025 07:47:03 -0700 Subject: [PATCH] Change order of backup wording. Add timestamp. --- bin/backup.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/backup.sh b/bin/backup.sh index 363b7f8..93abb42 100755 --- a/bin/backup.sh +++ b/bin/backup.sh @@ -9,9 +9,10 @@ source $DIR/../source.env ## Variables ## -DATE="`date "+%Y%m%d"`" -BASENAME="/tmp/Backup-Docker" -file="$BASENAME.$DATE.$HOSTNAME.zip" +TAG="Docker" +DATE="`date "+%Y%m%d_%H%M%S"`" +BASENAME="/tmp/Backup" +file="$BASENAME.$DATE.$HOSTNAME.$TAG.zip" time="`which time`" ## Main ## @@ -19,7 +20,7 @@ time="`which time`" # Remove the last backup. if [[ -e $file ]]; then echo "`date` - Removing existing file." - rm -fv "$BASENAME"* + rm -fv "$BASENAME"*"$TAG"* fi echo -e "\n`date` - Take down services for a cold backup."