Skip to content
Taras Kalapun edited this page Nov 3, 2016 · 1 revision

Useful things to do with Docker:

MongoDB dump & restore

docker run -it --rm -v ${HOME}/tmp:/tmp mongo bash -c 'mongodump -v -h "example.com" -u user -p "Password" -d "example" --out=/tmp'

docker run -it --rm -v ${HOME}/tmp:/tmp mongo bash -c 'mongorestore --drop -v -h "example.com" -u user -p "Password" -d "example" /tmp/example/collection.bson'

Clone this wiki locally