Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12187

extend mongodump to support --listExtents and --dumpExtents

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.5.5
    • None
    • Admin
    • None

    Description

      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

      Attachments

        Activity

          People

            dan@mongodb.com Daniel Pasette (Inactive)
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: