Last active
August 29, 2015 14:01
-
-
Save mattcanty/72a041f00aad51a1a973 to your computer and use it in GitHub Desktop.
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
mongodump | |
net stop MongoDB | |
rmdir C:\data\db /S /Q | |
mkdir C:\data\db | |
net start MongoDB | |
mongorestore | |
rmdir dump /S /Q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This assumes that you are running MongoDB as a service in Windows.
Create a new directory which is not in the MongoDB data directory.
Save this file into the new directory and run it.
Steps with some verbosity