wekan/snap-src/bin/mongodb-restore

19 lines
503 B
Text
Raw Normal View History

#!/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
2020-01-16 06:49:16 +02:00
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/snap/wekan/current/lib/x86_64-linux-gnu
# start mongodb backup
[ "x" == "x${MONGODB_BIND_IP}" ] && MONGODB_BIND_IP="127.0.0.1"
echo "using bind ip"
2019-08-06 22:02:23 +03:00
mongorestore --host $MONGODB_BIND_IP --port $MONGODB_PORT -d wekan --gzip --archive=$1
# --noIndexRestore