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

Clarify the steps to restore database to a single node replica set using the back files from file system snapshot

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None
    • 2

      The steps to Restore Database into a Single Node Replica Set include to initiate the new replica set.

      • For snapshot from Cloud Manager or Ops Manager, the steps work as the CM/OM don't backup the local database, hence the replica set configuration doesn't exist in the snapshot.
      • However for filesystem snapshot, all the data files are backed up, including the local database. When we try to initiate the new replica set while the replica set configuration already exists in the local database, the initialization fails:
        {
        	"info" : "try querying local.system.replset to see current configuration",
        	"ok" : 0,
        	"errmsg" : "already initialized",
        	"code" : 23,
        	"codeName" : "AlreadyInitialized"
        }
        

      So to restore the databases from a file system snapshot to a new replica set, there are some additional steps required before initializing the replica set. The overall steps should be:
      1. Obtain backup MongoDB Database files from filesystem snapshot.
      2. Start a standalone mongod instance.
      3. Drop the local database.
      4. Restart the mongod instance with --replSet option.
      5. Initiate the new replica set.

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            linda.qin@mongodb.com Linda Qin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 7 weeks, 4 days ago