>_ linuxcommand.dev
Startseite mongorestore
Database

mongorestore

Restores MongoDB data from mongodump backups

Syntax
$mongorestore [options] <dump-dir|archive>
Optionen
--db
--drop
--archive
--nsInclude
Examples
Examples
$mongorestore --db database /backup/path/database
Examples
$mongorestore --drop /backup/path
Examples
$mongorestore --archive=backup.archive
Warnings
--drop removes existing collections before restore
Typical use cases
Replay backups
Import test data
Verify migrations
Note Useful for full restores and selective namespace recovery.
Export