diff scripts/backup-container-docker.sh @ 523:9284ecfe940b production v2.16.1

flow: Merged <hotfix> '2.16.1' to <master> ('production').
author Marc Davis <marc.davis@mcoecn.org>
date Tue, 30 Jan 2024 10:55:04 -0500
parents 8ddeb5a36678
children 579a61f2037d
line wrap: on
line diff
--- a/scripts/backup-container-docker.sh	Tue May 09 18:34:52 2023 +0100
+++ b/scripts/backup-container-docker.sh	Tue Jan 30 10:55:04 2024 -0500
@@ -47,6 +47,17 @@
    echo "container name is $containerName"
 fi
 
+if [[ "$container" = "itcmdb" && -f ".env/itcm-shared.properties" ]]; then
+   function prop {
+       grep "${1}" .env/itcm-shared.properties|cut -d'=' -f2
+   }
+   entityId=$(prop 'entityId' | tr -d '"')
+   containerName="$entityId-itcm-db"
+   backupFile=./backup/${entityId}-itcm-db.$(date +%Y-%m-%d-%H-%M-%S).backup
+   echo "entityId is $entityId"
+   echo "container name is $containerName"
+fi
+
 if [ ! -z "$containerName" ]; then
    echo "Container is $container"
    if [ "$container" = "invdb" ]; then