Change order of backup wording. Add timestamp.

This commit is contained in:
2025-10-09 07:47:03 -07:00
parent 1e665a40b7
commit 51d6d32790

View File

@@ -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."