Skip to content

Instantly share code, notes, and snippets.

@miladr0
Created January 30, 2019 23:45
Show Gist options
  • Save miladr0/6807d4dbd0141c4f61ddb26b5f464bb1 to your computer and use it in GitHub Desktop.
Save miladr0/6807d4dbd0141c4f61ddb26b5f464bb1 to your computer and use it in GitHub Desktop.
Restore a Mongodb Database when using authentication
sudo mongorestore --username "YourUserName" --password "YourPassword" --authenticationDatabase "admin" --db yourdbname --drop /path/to/archive/folder/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment