Last active
March 16, 2022 11:51
-
-
Save Icaruk/f3c3cdccda6f3e9cbb568a84acbde348 to your computer and use it in GitHub Desktop.
mongodump + mongorestore
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 | |
mongodump --uri="mongodb://localhost:27017/dbName" --gzip --excludeCollection="collName" --archive="./dump" | |
// restore | |
mongorestore --uri="mongodb://localhost:27017/dbName" --gzip --drop --archive="./dump" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment