Created
November 2, 2020 13:08
-
-
Save etc-tiago/1fbe9e5eb0edf7006e534b8302483b5a to your computer and use it in GitHub Desktop.
backup-restore 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
docker exec mongo-docker sh -c 'mongodump -u root -p etc --archive --gzip' > ./mongo.db | |
docker exec -i mongo-docker-tests sh -c 'mongorestore -u root -p etc --gzip' < ./mongo.db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment