Created
July 31, 2013 05:01
-
-
Save raghothams/6119397 to your computer and use it in GitHub Desktop.
shell script to backup DB from mongo
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/bash | |
cd ~/backups | |
folder=$(date +%Y%m%d) | |
mkdir $folder && cd $folder | |
mongodump -d sharurl | |
tar -cvf dump.tar.gz ./dump | |
rm -rf ./dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment