Last active
February 8, 2020 12:15
-
-
Save anhdiepmmk/316546eb144f32aed6cd73bc91d51611 to your computer and use it in GitHub Desktop.
Câu lệnh backup và restore mongodb
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
mongodump --db database_name --username=user --password="password" --authenticationDatabase=admin --gzip --archive > /opt/database_name.gz |
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
mongorestore --db database_name --gzip --username=user --password="password" --authenticationDatabase=admin --archive < /opt/database_name.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment