I have a 2 TB gzip file that was created from a mongodb 4.2.6 instance using
mongodump with the
--gzip flags. I do not have access to this database nor do I have access to a MongoDB instance.
Because I have tooling that works with BSON files, I need to “convert” this file into a
*.bson file; or more precisely, I need one collection (I know the name of that collection) from the gzip in BSON format.
Is there a (reliable) way to extract a collection from this archive without restoring it into a live MongoDB instance first? Something along the lines of
mongorestore to stdout | mongodump…
The archive format seems to be relatively simple… Maybe there are tools around to extract a single collection from an archive?
Kudos to this reply to I wish to restore a gzipped tarball – what does mongodump –archive do? Howto do a mongorestore with –gzip? for the hint/link to the