MongoDB 8 · Backup and administration
Import JSON
Load a JSON file into a collection.
mongoimport --uri="mongodb://localhost:27017/mydb" --collection=users --file=users.json
Official MongoDB 8 documentation
More backup and administration commands
- Back up a database
- Restore a dump
- Export a collection to JSON
- Check database size
- Create a user
- Drop a collection
All backup and administration commands · MongoDB 8 cheatsheet