Created
November 6, 2019 16:28
-
-
Save zachmullen/b5769840574ccdb8899c3dfc7ffc7daf to your computer and use it in GitHub Desktop.
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 | |
fname=mongodump_$(date +%Y%m%d_%H%M%S) | |
mongodump -h localhost -d girder -o $fname || exit 1 | |
echo "Archiving girder_db_dump" | |
tar cjvf ${fname}.tar.bz2 $fname && rm -rf $fname | |
echo "Uploading girder_db_dump.tar.bz2 to S3 covalic-backup bucket" | |
python `dirname $0`/upload_to_s3.py ${fname}.tar.bz2 covalic-backup && rm ${fname}.tar.bz2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment