wekan/snap-src/bin/mongodb-restore
Lauri Ojansivu 64592d734c Back to MongoDB 6.
Thanks to xet7 1
2024-01-28 13:17:44 +02:00

19 lines
625 B
Bash
Executable file

#!/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
export PATH=/snap/${SNAP_NAME}/current/usr/bin:/snap/${SNAP_NAME}/current/bin:$PATH
export LD_LIBRARY_PATH=/snap/${SNAP_NAME}/current/lib:/snap/${SNAP_NAME}/current/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
# 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