Last active
November 30, 2016 21:08
-
-
Save gonter/b0383d7785bddc8e5809 to your computer and use it in GitHub Desktop.
MongoDB backup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dump/ | |
201?????T??????.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simple backup sdcrip for MongoDB | |
see https://gist.github.com/gonter/b0383d7785bddc8e5809 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
b_dir='/home/backup/wekan' | |
b_date=`/bin/date +%Y%m%dT%H%M%S` | |
( mkdir -p $b_dir && cd $b_dir && /usr/bin/mongodump && /usr/bin/zip -mpr $b_date dump ) | |
# now copy that zip to some other place, e.g. via scp | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment