mongodb-restore 625 B

12345678910111213141516171819
  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 PATH=/snap/${SNAP_NAME}/current/usr/bin:/snap/${SNAP_NAME}/current/bin:$PATH
  10. export LD_LIBRARY_PATH=/snap/${SNAP_NAME}/current/lib:/snap/${SNAP_NAME}/current/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
  11. # start mongodb backup
  12. [ "x" == "x${MONGODB_BIND_IP}" ] && MONGODB_BIND_IP="127.0.0.1"
  13. echo "using bind ip"
  14. mongorestore --host $MONGODB_BIND_IP --port $MONGODB_PORT -d wekan --gzip --archive=$1
  15. # --noIndexRestore