MQL
MongoDB
# FOR BSON, use dump (backup) and restore (restore backup)
mongodump --uri "mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/<database name>"
# drop will delete the stuff already in and create the new object from restore
mongorestore --uri "mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/<database name>" --drop dump
# FOR JSON, use export (backup) and import (import backup)
# collection to specify which collection
# out to specify the file name to export to
mongoexport --uri="mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/<database name>" --collection=sales --out=sales.json
mongoimport --uri="mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/<database name>" --drop sales.jsonQueries
Find
Insert
Insert conflicts
Updates
Upsert
Delete
Operators
EXPR
Array
Array operators and Projection
Array Operators and Sub-Documents
Sort and Limit
Last updated