Change order of backup wording. Add timestamp.
This commit is contained in:
@@ -9,9 +9,10 @@ source $DIR/../source.env
|
|||||||
|
|
||||||
## Variables ##
|
## Variables ##
|
||||||
|
|
||||||
DATE="`date "+%Y%m%d"`"
|
TAG="Docker"
|
||||||
BASENAME="/tmp/Backup-Docker"
|
DATE="`date "+%Y%m%d_%H%M%S"`"
|
||||||
file="$BASENAME.$DATE.$HOSTNAME.zip"
|
BASENAME="/tmp/Backup"
|
||||||
|
file="$BASENAME.$DATE.$HOSTNAME.$TAG.zip"
|
||||||
time="`which time`"
|
time="`which time`"
|
||||||
|
|
||||||
## Main ##
|
## Main ##
|
||||||
@@ -19,7 +20,7 @@ time="`which time`"
|
|||||||
# Remove the last backup.
|
# Remove the last backup.
|
||||||
if [[ -e $file ]]; then
|
if [[ -e $file ]]; then
|
||||||
echo "`date` - Removing existing file."
|
echo "`date` - Removing existing file."
|
||||||
rm -fv "$BASENAME"*
|
rm -fv "$BASENAME"*"$TAG"*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\n`date` - Take down services for a cold backup."
|
echo -e "\n`date` - Take down services for a cold backup."
|
||||||
|
Reference in New Issue
Block a user