Skip to content
Snippets Groups Projects
Commit 17be55cb authored by Antoine Barbare's avatar Antoine Barbare
Browse files

fix mongo restore script

parent 3a5a1144
No related branches found
No related tags found
No related merge requests found
......@@ -58,10 +58,10 @@ echo "=> ${MONGO_SERVICE_NAME}: Restore database from \$1"
echo " => Uncompress save \$1"
tar -xzvf \$1
output="\$(echo \$1 | awk -F'.tar.gz' '{print \$1}')"
if mongorestore -d wekan -h wekan-db2:27017 \$output;then
echo "wekan: Restore succeeded"
if mongorestore -d ${MONGO_SERVICE_NAME} -h ${MONGO_HOST}:${MONGO_PORT} \$output;then
echo "${MONGO_SERVICE_NAME}: Restore succeeded"
else
echo "wekan: Restore failed"
echo "${MONGO_SERVICE_NAME}: Restore failed"
fi
rm -Rf \$output
EOF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment