From d261b7b64c38aa7a8da7864b3fb6f1243b04fb41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 26 Jul 2016 12:13:44 +0200 Subject: [PATCH] Added restore-db.sh, which restores a MongoDB dump to the local database. --- restore-db.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 restore-db.sh diff --git a/restore-db.sh b/restore-db.sh new file mode 100755 index 00000000..f07ab1d3 --- /dev/null +++ b/restore-db.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ -z "$1" ]; then + echo "Usage: $0 dump/{timestamp, like 2016-07-26-1150}" >&2 + exit 1 +fi + +mongorestore -h localhost:27017 -d eve --maintainInsertionOrder --stopOnError "$1/eve"