Page MenuHome

restore-db.sh
No OneTemporary

restore-db.sh

#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 dump/{timestamp, like 2016-07-26-1150}" >&2
exit 1
fi
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/cloud"

File Metadata

Mime Type
text/x-shellscript
Expires
Tue, Sep 22, 7:51 PM (2 d)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1f/1f/3d415883dfee9fb13634645f4d90

Event Timeline