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