Created
May 4, 2019 09:30
-
-
Save evenfrost/fd8b57466691842bcccf84dc73d365fa to your computer and use it in GitHub Desktop.
Some MongoDB commands
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 database from Docker container | |
docker run --rm --link mongo:mongo -v /var/dumps/mongo:/backup mongo bash -c 'mongodump --gzip --archive=/backup/dump-$(date +%Y%m%d%H%M%S).gz --host=mongo:27017' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment