Created
August 15, 2021 18:02
-
-
Save brishtiteveja/0abb583b169dffb1f69757b0a7a1ab86 to your computer and use it in GitHub Desktop.
backup avalon 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
echo "1. Creating mongo dump." | |
mkdir ~/backup | |
cd ~/backup | |
mongodump -d avalon -o ~/backup/ | |
echo "" | |
tar_file_name="avalon.tar.gz" #$(TZ=GMT date +"%d%h%Y_%H").tar.gz | |
echo "2. Making tarball "$tar_file_name | |
cd avalon | |
tar -czvf $tar_file_name * | |
echo "" | |
echo "3. Making blocks.zip" | |
zip blocks.zip blocks.bson blocks.metadata.json | |
echo "" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment