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

Error when dumping and restoring system.* collections from the admin db with the archive mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: 3.4.12
    • Fix Version/s: No version
    • Component/s: mongodump, mongorestore
    • Labels:
      None
    • Environment:
      Ubuntu 16.04

      Description

      if you dump a collection of the admin.system.* namespace, you got an error when trying to restore it. ex: with the system.roles collection

      Mongodump

       

      mongodump --authenticationDatabase admin -d admin -c system.roles --archive=roles.archive --gzip -u admin
      

      Mongorestore

      mongorestore --drop --authenticationDatabase admin --archive=roles.archive --gzip -u admin
      

      You get the following error:

      2019-10-08T16:39:19.372+0200	preparing collections to restore from
      2019-10-08T16:39:19.383+0200	assuming users in the dump directory are from <= 2.4 (auth version 1)
      2019-10-08T16:39:19.384+0200	Failed: the users and roles collections in the dump have an incompatible auth version with target server: cannot restore users of auth version 1 to a server of auth version 5

      I'm dumping and restoring from the same mongoDB server!

      If i do not specify a given collection but the full admin db for the dump, it works!

       

        Attachments

          Activity

            People

            Assignee:
            david.golden David Golden
            Reporter:
            gregory.maes@sigfox.com Gregory Maes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: