comparison scripts/backup-container-docker.sh @ 529:579a61f2037d

add conditionals for ess db when backing up databases.
author Marc Davis <marc.davis@mcoecn.org>
date Thu, 02 May 2024 22:42:40 -0400
parents 8ddeb5a36678
children fb25711eead7
comparison
equal deleted inserted replaced
528:e483148f5283 529:579a61f2037d
56 backupFile=./backup/${entityId}-itcm-db.$(date +%Y-%m-%d-%H-%M-%S).backup 56 backupFile=./backup/${entityId}-itcm-db.$(date +%Y-%m-%d-%H-%M-%S).backup
57 echo "entityId is $entityId" 57 echo "entityId is $entityId"
58 echo "container name is $containerName" 58 echo "container name is $containerName"
59 fi 59 fi
60 60
61 if [[ "$container" = "essdb" && -f ".env/ess-shared.properties" ]]; then
62 function prop {
63 grep "${1}" .env/ess-shared.properties|cut -d'=' -f2
64 }
65 entityId=$(prop 'entityId' | tr -d '"')
66 containerName="$entityId-ess-db"
67 backupFile=./backup/${entityId}-ess-db.$(date +%Y-%m-%d-%H-%M-%S).backup
68 echo "entityId is $entityId"
69 echo "container name is $containerName"
70 fi
71
61 if [ ! -z "$containerName" ]; then 72 if [ ! -z "$containerName" ]; then
62 echo "Container is $container" 73 echo "Container is $container"
63 if [ "$container" = "invdb" ]; then 74 if [ "$container" = "invdb" ]; then
64 echo "IRN is $IRN" 75 echo "IRN is $IRN"
65 fi 76 fi