Stream a dump to a gzip archive.
Section: Backup and restore
Create a compressed archive dump
bash
bash
mongodump --uri="mongodb://localhost:27017/appdb" --archive | gzip > appdb.archive.gzExplanation
A convenient way to produce one compressed artifact for transport or storage.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Backup and restore
Restore a dump and drop existing data first
Restore into a collection or database after clearing prior content.
Restore only selected namespaces
Restore a subset of data from a larger dump.
Initiate a simple replica set
Initialize a replica set on a self-managed deployment.