MongoDB 8 · Backup and administration
Back up a database
Write a binary dump of one database to a folder.
mongodump --uri="mongodb://localhost:27017/mydb" --out=backup/
Official MongoDB 8 documentation
More backup and administration commands
- Restore a dump
- Export a collection to JSON
- Import JSON
- Check database size
- Create a user
- Drop a collection
All backup and administration commands · MongoDB 8 cheatsheet