Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 475 Bytes

mongo-restore-database.md

File metadata and controls

17 lines (10 loc) · 475 Bytes

Restore database to MongoDB

mongorestore --db={{DB_NAME}} --drop {{PATH}}

  • DB_NAME: Database's name.
  • PATH: Path to the backup.
  • drop: Optional flag to remove the collections from the database before restoring from backup.

Examples:

mongorestore --db=ak-cli /arshad/ak-cli/db/dump/ak-cli

mongorestore --db=ak-cli --drop /arshad/ak-cli/db/dump/ak-cli

Related Commands