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

mongodump only creates a partial dump

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL

      I tried to execute mongodump with the -q parameter.

      mongodump --host localhost --port 27017 -c dvc_id_reports -q {time:{$lt:ISODate("2016-06-20T00:00:00Z")}} -d testdb -o ./dump/
      

      But it dumps only 241512 documents. (according to ouput of mongodump)
      If i execute the same query with a count-command it returns 828413 documents.

      db.getCollection('dvc_id_reports').count({time:{$lt:ISODate("2016-06-20T00:00:00Z")}})
      // or
      db.getCollection('dvc_id_reports').find({time:{$lt:ISODate("2016-06-20T00:00:00Z")}}).count()
      

      But if i use itcount() also return the wrong number of documents (241512):

      db.getCollection('dvc_id_reports').find({time:{$lt:ISODate("2016-06-20T00:00:00Z")}}).itcount()
      

        1. mongos-stage-mongo15.txt
          8 kB
          Christian Indra
        2. shard1_primary-stage-mongo15.txt
          4 kB
          Christian Indra
        3. shard2_primary-stage-mongo17.txt
          7 kB
          Christian Indra
        4. shard3_primary-stage-mongo16.txt
          4 kB
          Christian Indra

            Assignee:
            mark.agarunov Mark Agarunov
            Reporter:
            chi@tractive.com Christian Indra
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: