extend mongodump to support --listExtents and --dumpExtents

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.5
    • Affects Version/s: None
    • Component/s: Admin
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Add ability to list extents for a collection and dump the BSON directly for a given extent via mongodump using new options --listExtents and --dumpExtent. Must specify --dbpath when using either option, as a mongod process must not be running or attached to the data files.

      // list extents for collection test.foo to dump/test/foo.extents.
      // outputs 1 extent per line in the format 'diskLoc,size', e.g, '4:d587000,20480'
      mongodump --dbpath /data/db/ --db test --collection foo --listExtents
      
      // dump to dump/test/foo-4-d587000.bson
      mongodump --dbpath /data/db/ --db test --collection foo --dumpExtent --diskLoc 4:d587000
      
      // dump one extent to stdout and redirect to a file
      mongodump --dbpath /data/db/ --db test --collection foo --dumpExtent --diskLoc 4:d587000 --out -  > foo.bson
      

            Assignee:
            Daniel Pasette (Inactive)
            Reporter:
            Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: