From 862fcbf1476b610d4ffccc98810ddd30cea0c716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 26 Jul 2016 17:23:09 +0200 Subject: [PATCH] restore-db.sh: drop existing collections before restoring. --- restore-db.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/restore-db.sh b/restore-db.sh index f07ab1d3..ccb2014c 100755 --- a/restore-db.sh +++ b/restore-db.sh @@ -5,4 +5,8 @@ if [ -z "$1" ]; then exit 1 fi -mongorestore -h localhost:27017 -d eve --maintainInsertionOrder --stopOnError "$1/eve" +echo "THIS WILL DROP EXISTING CONNECTIONS" +echo "Press [ENTER] to continue, [CTRL]+[C] to abort." +read dummy + +mongorestore -h localhost:27017 -d eve --drop --maintainInsertionOrder --stopOnError "$1/eve"