comparison 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
comparison
equal deleted inserted replaced
286:477609392d1b 287:4cc087cde1d0
13 13
14 cd $projectDir 14 cd $projectDir
15 15
16 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh" 16 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh"
17 17
18 project=$(composeGetProject)
19
18 set -o pipefail 20 set -o pipefail
19 mkdir -p ./backup 21 mkdir -p ./backup
20 backupFile=./backup/${container}.$(date +%Y-%m-%d-%H-%M-%S).backup 22 backupFile=./backup/${project}-${container}.$(date +%Y-%m-%d-%H-%M-%S).backup
21 23
22 echo "preparing to backup ${container} on current project at ${projectDir}:" 24 echo "preparing to backup ${container} on current project at ${projectDir}:"
23 echo " " 25 echo " "
24 26
25 project=$(composeGetProject) 27
26 28
27 if [ "$project" == "" ]; then 29 if [ "$project" == "" ]; then
28 echo "no project available" 30 echo "no project available"
29 exit 1 31 exit 1
30 fi 32 fi