Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the archive format used by mongodump with "--archive" key? [duplicate]

Is there a way to extract data from that archive without mongorestore?

like image 543
alex_1948511 Avatar asked Jun 23 '16 14:06

alex_1948511


People also ask

Where is Mongodump stored?

The mongodump command will overwrite the existing files within the given backup folder. The default location for backups is the dump/ folder. When the WiredTiger storage engine is used in a MongoDB instance, the output will be uncompressed data.

What is Mongodump and Mongorestore?

The mongodump and mongorestore utilities work with BSON data dumps, and are useful for creating backups of small deployments. For resilient and non-disruptive backups, use a file system or block-level disk snapshot function, such as the methods described in the MongoDB Backup Methods document. Note.

What is the difference between Mongodump and Mongoexport?

mongoexport is a command-line tool that produces a JSON or CSV export of data stored in a MongoDB instance. mongodump is a utility for creating a binary export of the contents of a database.


1 Answers

It's a kind of custom tar multiplexed archive where the only spec is the code : https://github.com/mongodb/mongo-tools-common/blob/7c66b71dc6036ef84bf3c2c93cf2e50f730853fc/archive/archive.go

like image 70
zerodeux Avatar answered Dec 31 '22 23:12

zerodeux