Skip to content

Instantly share code, notes, and snippets.

@evenfrost
Created May 4, 2019 09:30
Show Gist options
  • Save evenfrost/fd8b57466691842bcccf84dc73d365fa to your computer and use it in GitHub Desktop.
Save evenfrost/fd8b57466691842bcccf84dc73d365fa to your computer and use it in GitHub Desktop.
Some MongoDB commands
# 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