Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1637

Mongorestore throwing error "system.profile: error creating collection" on version 3.2.9

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: mongodump, mongorestore
    • Environment:
      Trying it on Redhat.

      Mongorestoring a backup file has thrown up an error in 3.2.9. Replacing actual database name with <db_name> in the below error on a single node mongo instance.

      Error:

      Failed: <db_name>.system.profile: error creating collection <db_name>.system.profile: error running create command: collection already exists

      Issue:

      While restoring a backup taken using mongodump, I got the above error.

      I have a work around by excluding system.profile by using --excludeCollection while using mongodump. When I restored the backup taken using this option, mongo restore went smooth. Just want to make sure is it really a bug in 3.2.9?

      Without the above workaround, mongodump taken when restored was causing mismatch in number of documents for a few collections in source db (the database which was mongodump 'ed) and the restored mongo db (the mongodb restored until the point of error).

      *Please confirm if this is a bug in 3.2.9. If yes,

      1) Does my work around have any unforeseen issues?
      2) When would this bug be fixed? What is your suggested work around?

      If it is not a bug, how do I avoid the above mentioned error?
      *

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            noothan05 Avinash Naidu
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: