From 9272bbe14370a709a0183bcb2abeb0ccf89c289b Mon Sep 17 00:00:00 2001 From: Cristian Goina Date: Fri, 29 Apr 2022 16:26:38 -0400 Subject: [PATCH] drop treeNode before restoring the database --- vpc_stack/src/jacs/install-jacs-stack.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vpc_stack/src/jacs/install-jacs-stack.sh b/vpc_stack/src/jacs/install-jacs-stack.sh index 721ae8e..c2ae705 100644 --- a/vpc_stack/src/jacs/install-jacs-stack.sh +++ b/vpc_stack/src/jacs/install-jacs-stack.sh @@ -266,6 +266,8 @@ function createBackupJob() { function restoreDatabase() { echo "Restore database from /s3data/${RESTORE_BUCKET}${RESTORE_FOLDER}/jacs" + # drop the treeNode so that the workspace and treeNode entries get restored with the previous IDs + ./manage.sh mongo -notty --eval "db.treeNode.drop()" ./manage.sh mongo-restore "/s3data/${RESTORE_BUCKET}${RESTORE_FOLDER}/jacs" }