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

Seed a New Secondary from Backup Restore

      There are a few issues on the Seed a New Secondary from Backup Restore page.

      1. The Remove the broken secondary from your replica set step should specify that this step is done on the primary (the add it back step at the end already does this). If you don't do it on the primary, you'll get an error message:

      demo:SECONDARY> rs.remove("demo-1.mongodbdns.com:27000")
          "ok" : 0,
          "errmsg" : "replSetReconfig should only be run on PRIMARY, but my state is SECONDARY; use the \"force\" argument to override",
          "code" : 10107

      2. The Bring up new node as a standalone step needs to include a z option to the tar command:

      tar -zxvf <backupRestoreName>.tar.gz

      3. The Bring up new node as a standalone step should use sudo to prevent the ephemeral mongod process from creating files that will be owned by an inappropriate userid. So instead of:

      mongod --port <alternatePort> --dbpath /data

      ... it would be:

      sudo -u mongod mongod --port <alternatePort> --dbpath /data

      4. The Bring up new node as a standalone step mentions "data" in the mv command without any context. I think it's conveying that the backup image becomes /data as in:

      mv <backupRestoreName> /data

      5. When you add it back, it is also worth noting that even if the command succeeds, you get a message that reads as if an error occurred:

      demo:PRIMARY> rs.add("demo-1.mongodbdns.com:27000")
          "ok" : 0,
          "errmsg" : "Found two member configurations with same host field, members.1.host == members.3.host == demo-1.mongodbdns.com:27000",
          "code" : 103

      Comment on: "tutorial/use-restore-to-seed-secondary.txt"

            tony.sansone@mongodb.com Anthony Sansone (Inactive)
            jake.angerman Jake Angerman
            0 Vote for this issue
            4 Start watching this issue

              7 years, 38 weeks, 5 days ago