mongodb-restore 503 B

123456789101112131415161718
  1. #!/bin/bash
  2. # get wekan/mongo settings
  3. source $SNAP/bin/wekan-read-settings
  4. # make sure we have set minimum env variables for locale
  5. if [ -z "$LANG" ]; then
  6. export LANG=en_US.UTF-8
  7. fi
  8. export LC_ALL=C
  9. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/snap/wekan/current/lib/x86_64-linux-gnu
  10. # start mongodb backup
  11. [ "x" == "x${MONGODB_BIND_IP}" ] && MONGODB_BIND_IP="127.0.0.1"
  12. echo "using bind ip"
  13. mongorestore --host $MONGODB_BIND_IP --port $MONGODB_PORT -d wekan --gzip --archive=$1
  14. # --noIndexRestore