Last active
December 16, 2020 13:39
-
-
Save swateek/894501254f1ef2e343446c9c28eaa2eb to your computer and use it in GitHub Desktop.
Everything MongoDB related
This file contains hidden or 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
# using mongodump | |
mkdir swateek | |
mongodump --db="stats" --out="./swateek" --gzip | |
cd swateek | |
tar cvzf ../db_backup.tar.gz * | |
# using mongorestore | |
tar -xvzf db_backup.tar.gz | |
mongorestore --gzip --db="stats" --noIndexRestore stats/ |
This file contains hidden or 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
# Everything Mongo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment