Skip to content

Instantly share code, notes, and snippets.

Created April 5, 2019 08:38
What would you like to do?
Downloading MongoDB data onto your local machine

Downloading mongodb data

Execute the following commands to download the database onto your machine.

First, on the server execute this command: mongodump -d <db-name> -o <db-name>

Download the folder called and the on your machine, execute the following command

mongorestore -d <db-name> <db-name>/<db-name>/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment