Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3847

Instructions for (MMS) Restoring a Replica Set from Backup don't actually work



    • Bug
    • Status: Closed
    • Blocker - P1
    • Resolution: Fixed
    • None
    • v1.3.11, v1.3.15
    • Cloud Manager
    • None
    • OSX 10.9.4
      MongoDB 2.6.3
    • 8
    • true


      I have just tried to run through the instructions for restoring a replica set from a downloaded MMS backup (http://mms.mongodb.com/help/tutorial/restore-replica-set/).

      I am running MongoDB 2.6.3 on OSX 10.9.4.

      I have started a restore job on my MMS group, and then downloaded the tar.gz file via HTTPS.

      I have created a new empty replica-set, then I follow step 1, "Shut down the entire replica set".

      I then follow steps 2 through to 4. However, when I attempt to run the seedSecondary.sh script in step 4, this fails with:

      ./seedSecondary.sh 27017 1.8
      MongoDB shell version: 2.6.3
      connecting to:
      2014-07-31T13:15:07.883+1000 collection already exists

      The script appears to be attempting to create the oplog.rs collection, which I believe already exists in my replicaset.

      I increased my logging to logLevel2, and then ran that command again to confirm this:

      2014-07-31T13:20:44.663+1000 [initandlisten] connection accepted from #6 (2 connections now open)
      2014-07-31T13:20:44.663+1000 [conn6] run command admin.$cmd { whatsmyuri: 1 }
      2014-07-31T13:20:44.664+1000 [conn6] command admin.$cmd command: whatsmyuri { whatsmyuri: 1 } ntoreturn:1 keyUpdates:0 numYields:0  reslen:62 0ms
      2014-07-31T13:20:44.665+1000 [conn6] run command local.$cmd { create: "oplog.rs", capped: true, size: 1932735283.2 }
      2014-07-31T13:20:44.665+1000 [conn6] create collection local.oplog.rs { capped: true, size: 1932735283.2 }
      2014-07-31T13:20:44.665+1000 [conn6] command local.$cmd command: create { create: "oplog.rs", capped: true, size: 1932735283.2 } keyUpdates:0 numYields:0 locks(micros) w:163 reslen:75 0ms
      2014-07-31T13:20:44.667+1000 [conn6] SocketException: remote: error: 9001 socket exception [CLOSED] server []
      2014-07-31T13:20:44.667+1000 [conn6] end connection (1 connection now open)

      I then delete all of my local database files (local.0, local.1 and local.ns), and retry step 4:

      ./seedSecondary.sh 27017 1.8
      MongoDB shell version: 2.6.3
      connecting to:
      WriteResult({ "nInserted" : 1 })

      Step 4 now appears to be successful (although I'm curious if there's a better way of working around this). I I continue with step 5 and step 6, however, I seem to hit an error at step 6 when it asks me to run rs.initiate():

      MongoDB shell version: 2.6.3
      connecting to: test
      Server has startup warnings:
      2014-07-31T13:30:57.659+1000 [initandlisten]
      2014-07-31T13:30:57.660+1000 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
      > rs.initiate()
              "ok" : 0,
              "errmsg" : "local.oplog.rs is not empty on the initiating member.  cannot initiate."

      Would it be possible to fix the instructions in step 1 as well as step 6 please?




            bgrabar Bob Grabar
            victor.hooi Victor Hooi
            Jess Mokrzecki Jess Mokrzecki
            1 Vote for this issue
            12 Start watching this issue


              4 years, 16 weeks ago