Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 529 Bytes

mongo-dump-collection.md

File metadata and controls

15 lines (9 loc) · 529 Bytes

Dump single collection from MongoDB

mongodump --db={{DB_NAME}} --collection={{COLLECTION_NAME}} --out={{DESTINATION_DIRECTORY}}

  • DB_NAME: DB to get backup from
  • COLLECTION_NAME: Collection which needs to be dumped in destination directory
  • DESTINATION_DIRECTORY: Directory/path where to dump the backup collection

Example:

mongodump --db=ak-cli --collection=cli_commands --out=/arshad/ak-cli/db/dump

Related Commands