-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
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.
- is duplicated by
-
DOCS-6122 Documentation for backing up/restoring a replica set needs to be updated wrt WiredTiger
- Closed