|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
# Проверяем наличие DB laboratory
|
|
# Проверяем наличие DB laboratory
|
|
if [[ $(mongo --host ${DB_CLUSTER} --quiet --eval "printjson(db.adminCommand('listDatabases'))"|grep -q "${MONGODB}";echo $?) -ne 0 ]];then
|
|
if [[ $(mongo --host ${DB_CLUSTER} --quiet --eval "printjson(db.adminCommand('listDatabases'))"|grep -q "${MONGODB}";echo $?) -ne 0 ]];then
|
|
- cd /tmp && tar xvf /opt/${MONGODB}.tar.gz
|
|
|
|
|
|
+ cd /tmp && tar xvf /opt/dev-${MONGODB}.tar.gz
|
|
mongorestore --host ${DB_CLUSTER} -d ${MONGODB} ${MONGODB}
|
|
mongorestore --host ${DB_CLUSTER} -d ${MONGODB} ${MONGODB}
|
|
if [[ $? -ne 0 ]]; then echo "Database ${MONGODB} is not restored!!!";rm -rf /tmp/${MONGODB};exit 1;fi
|
|
if [[ $? -ne 0 ]]; then echo "Database ${MONGODB} is not restored!!!";rm -rf /tmp/${MONGODB};exit 1;fi
|
|
rm -rf /tmp/${MONGODB}
|
|
rm -rf /tmp/${MONGODB}
|