Uploaded image for project: 'MongoDB ETL Tools'
  1. MongoDB ETL Tools
  2. TOOLS-857

mongorestore does not restore files, unless they are in a sub-directory.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Documentation Changes:
      Needed

      Description

      Assume the mongodump files are located in testDB and these are the contents of that directory i.e. there are no subdirectories

      ls -lrt testDB/
      total 664
      -rw-r--r--  1 angushman-temp  staff      87 Jul 29 14:34 testColl.metadata.json
      -rw-r--r--  1 angsuhman-temp  staff  330000 Jul 29 14:34 testColl.bson
      -rw-r--r--  1 angsuhman-temp  staff      70 Jul 29 14:34 system.indexes.bson
      

      Then running mongod 3.0.5 and mongorestore 3.0.5 attempting to restore testDB directly does not work:

      angushman-temp$ mongorestore testDB/
      2015-07-29T14:36:23.472-0700	building a list of dbs and collections to restore from testDB/ dir
      2015-07-29T14:36:23.473-0700	don't know what to do with file "testDB/system.indexes.bson", skipping...
      2015-07-29T14:36:23.473-0700	don't know what to do with file "testDB/testColl.bson", skipping...
      2015-07-29T14:36:23.473-0700	don't know what to do with file "testDB/testColl.metadata.json", skipping...
      2015-07-29T14:36:23.473-0700	done
      

      With mongod 2.6.10 and mongorestore 2.6.10 on the other hand I am able to successfully restore.

      On 3.0.5 I can restore from the parent directory of testDB. So it looks like mongorestore in 3.0.5 is expecting two directory levels in order to restore.

        Attachments

          Activity

            People

            • Assignee:
              gabriel.russell Gabriel Russell
              Reporter:
              angshuman.bagchi Angshuman Bagchi
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: