[DOCS-11048] Clarify the steps to restore database to a single node replica set using the back files from file system snapshot Created: 22/Nov/17  Updated: 30/Oct/23  Resolved: 04/Apr/18

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Critical - P2
Reporter: Linda Qin Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by DOCS-6122 Documentation for backing up/restorin... Closed
Participants:
Days since reply: 5 years, 45 weeks ago
Story Points: 2

 Description   

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.



 Comments   
Comment by Githook User [ 04/Apr/18 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'kay', 'username': 'kay-kim'}

Message: DOCS-11048: missed line during cherry-pick merge conflict
Branch: v3.4
https://github.com/mongodb/docs/commit/cd28f9f9ffe1ed268282a26540b69472381f76d0

Comment by Githook User [ 04/Apr/18 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'kay', 'username': 'kay-kim'}

Message: DOCS-11048: drop local in restore from fs
Branch: v3.4
https://github.com/mongodb/docs/commit/fd1df98d9569a8df7cdf55c001616996bee57f3f

Comment by Githook User [ 04/Apr/18 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'kay', 'username': 'kay-kim'}

Message: DOCS-11048: drop local in restore from fs
Branch: master
https://github.com/mongodb/docs/commit/39e09cd0659ca01ee89a165675be9e09a5131248

Generated at Thu Feb 08 08:01:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.