Compare commits
2 Commits
1e665a40b7
...
4acbd47388
| Author | SHA1 | Date | |
|---|---|---|---|
| 4acbd47388 | |||
| 51d6d32790 |
@@ -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