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

'mongorestore' utility failed to restore 'admin' database on config replica set

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 3.4.1
    • Component/s: mongorestore
    • Labels:
      None
    • Not Needed

      I have sharded cluster with replication and authentication. Config replica set consists of three mongod servers. Each config mongod process is started with command similar to:

      /opt/mongodb/bin/mongod \
                --auth \
                --port 27017 \
                --dbpath /data \
                --keyFile /data/mongodb-keyfile \
                --replSet cnfrs \
                --configsvr \
                --wiredTigerCacheSizeGB 0.25
      

      I decided to restore admin database, so I call mongorestore:

      /opt/mongodb/bin/mongorestore --drop \
      			--username=root \
      			--password=root \
      			--authenticationDatabase=admin \
      			--host=cnfrs/cnfrs0:27017,cnfrs1:27017,cnfrs2:27017 \
      			--db=admin \
      			--batchSize=1 \
      			/backup-storage/20170125T1600/admin
      

      and it failed with message:

      2017-01-27T13:55:38.102+0000    the --db and --collection args should only be used when restoring from a BSON file. Other uses are deprecated and not exist in the future; use --nsInclude 
      2017-01-27T13:55:38.102+0000    building a list of collections to restore from /backup-storage/20170125T1600/admin dir
      2017-01-27T13:55:38.104+0000    restoring users from /backup-storage/20170125T1600/admin/system.users.bson
      2017-01-27T13:55:39.076+0000    Failed: restore error: error running merge command: Illegal attempt to set operation deadline within DBDirectClient
      

            Assignee:
            spencer.jackson@mongodb.com Spencer Jackson
            Reporter:
            lis0x90 Sergey Lisovoy
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: