summaryrefslogtreecommitdiffstats
path: root/snap-src/bin/mongodb-restore
blob: cbc634372200b1d799a35c53190eccc09604903a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# get wekan/mongo settings
source $SNAP/bin/wekan-read-settings

# make sure we have set minimum env variables for locale
if [ -z "$LANG" ]; then
    export LANG=en_US.UTF-8
fi

export LC_ALL=C

# start mongodb backup
[ "x" == "x${MONGODB_BIND_IP}" ] && MONGODB_BIND_IP="127.0.0.1"
echo "using bind ip"
mongorestore --host $MONGODB_BIND_IP --port $MONGODB_PORT -d wekan --gzip --archive=$1
# --noIndexRestore