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

mongodump/restore is not a recommended way to initialize a new replica set node

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • manual
    • 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.

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 29 weeks, 6 days ago