From a533caa9447c78fd007dfb7ada15c41390e97e05 Mon Sep 17 00:00:00 2001 From: Ondrej Kubik Date: Sat, 4 Nov 2017 18:56:35 +0000 Subject: rearranging helper scripts in snap-src Signed-off-by: Ondrej Kubik --- snap-src/bin/mongodb-restore | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 snap-src/bin/mongodb-restore (limited to 'snap-src/bin/mongodb-restore') diff --git a/snap-src/bin/mongodb-restore b/snap-src/bin/mongodb-restore new file mode 100755 index 00000000..c1c82775 --- /dev/null +++ b/snap-src/bin/mongodb-restore @@ -0,0 +1,16 @@ +#!/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 -- cgit v1.2.3-1-g7c22