Skip to content

Instantly share code, notes, and snippets.

@etc-tiago
Created November 2, 2020 13:08
Show Gist options
  • Save etc-tiago/1fbe9e5eb0edf7006e534b8302483b5a to your computer and use it in GitHub Desktop.
Save etc-tiago/1fbe9e5eb0edf7006e534b8302483b5a to your computer and use it in GitHub Desktop.
backup-restore mongo
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