Mercurial > public > ssdt-docker
diff scripts/backup-container.sh @ 287:4cc087cde1d0
backup script additions and changes
author | aldrich@nwoca.org |
---|---|
date | Tue, 11 Dec 2018 16:17:25 +0000 |
parents | 7710677f147c |
children | d78b45c28205 |
line wrap: on
line diff
--- a/scripts/backup-container.sh Thu Dec 06 17:23:30 2018 +0000 +++ b/scripts/backup-container.sh Tue Dec 11 16:17:25 2018 +0000 @@ -15,14 +15,16 @@ source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh" +project=$(composeGetProject) + set -o pipefail mkdir -p ./backup -backupFile=./backup/${container}.$(date +%Y-%m-%d-%H-%M-%S).backup +backupFile=./backup/${project}-${container}.$(date +%Y-%m-%d-%H-%M-%S).backup echo "preparing to backup ${container} on current project at ${projectDir}:" echo " " -project=$(composeGetProject) + if [ "$project" == "" ]; then echo "no project available"