Skip to content

Instantly share code, notes, and snippets.

@harisfi
Created October 1, 2021 14:33
Show Gist options
  • Save harisfi/30152bdbb748fb22a939d29c67ae79a2 to your computer and use it in GitHub Desktop.
Save harisfi/30152bdbb748fb22a939d29c67ae79a2 to your computer and use it in GitHub Desktop.
mongodump --uri "mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies"
mongoexport --uri="mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies" --collection=sales --out=sales.json
mongorestore --uri "mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies" --drop dump
mongoimport --uri="mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies" --drop sales.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment