MongoDB 8 · Backup and administration
Restore a dump
Restore a dump into a server.
mongorestore --uri="mongodb://localhost:27017" backup/
Caution: Restoring can overwrite documents with the same _id. Use --drop only when you mean to replace existing collections.
Official MongoDB 8 documentation
More backup and administration commands
- Back up a database
- Export a collection to JSON
- Import JSON
- Check database size
- Create a user
- Drop a collection
All backup and administration commands · MongoDB 8 cheatsheet