mongorestore

Restore MongoDB

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
mongorestore --dryRun <dir>Dry run
What it does

Restores BSON dumps. See the flags and examples below, and run `man mongorestore` for the full reference.

Common flags
FlagMeaning
--drop --dropDrop collections before restore⚠ Deletes existing data.
Examples
mongorestore --uri mongodb://host backup/Restore · explain & risk-check →
Related
mongodump
Open the full explainer →More in Databases

Reference text is hand-written and may be incomplete — check man mongorestore for your version. Test destructive commands on a non-production system first.