Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
The documentation needs to clearly state that mongodump/restore is not a good option to initialize a new node of a replica set. A filesystem snapshot or a file copy (from a locked node) should be used instead.
The reason is that mongodump does not include the local database.
There is a complex work-around "priming the oplog", where one has to create the capped oplog.rs collection and insert the correct (latest) oplog entry into it. However, this is not documented anywhere (as far as I can tell).
The page on Expanding Replica Sets actually refers to Backup Strategies for MongoDB Systems, which mentions mongodump as a valid method to take a backup. This is confusing and can be interpreted as the correct solution to initialize the secondary to be added to a replica set.
Furthermore, the documentation of mongodump does not state that the local database is omitted when dumping all databases.
Finally, the documentation on Use mongodump and mongorestore to Backup and Restore MongoDB Databases keeps referring to "local database", but this term is ambiguous with the actual database called "local". This should also be addressed.