From 10870155b591cd80546b3f4b29f1d849af254988 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Wed, 8 Aug 2012 13:24:14 -0400 Subject: [PATCH] DOCS-385 change to clarifiy recovery on replica sets --- .../recover-data-following-unexpected-shutdown.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/tutorial/recover-data-following-unexpected-shutdown.txt b/source/tutorial/recover-data-following-unexpected-shutdown.txt index dd678ca335f..d2a643dca21 100644 --- a/source/tutorial/recover-data-following-unexpected-shutdown.txt +++ b/source/tutorial/recover-data-following-unexpected-shutdown.txt @@ -15,8 +15,12 @@ milliseconds by default, and ensures that MongoDB will be able to recover a constant state even in the case of an unclean shutdown due to power loss or other system failure. -If you do not have journaling enabled, use the following procedure to -recover data that may be in an inconsistent state. +If you are *not* running as part of a :term:`replica set` **and** do +*not* have journaling enabled use the following procedure to recover +data that may be in an inconsistent state. If you are running as part +of a replica set, you should *always* restore from a backup or restart +the :program:`mongod` instance with an empty :setting:`dbpath` and +allow MongoDB to resync the data. .. seealso:: The ":doc:`/administration`" documents and the documentation of the :setting:`repair`, :setting:`repairpath`, and @@ -34,8 +38,10 @@ Indications ~~~~~~~~~~~ When you are aware of a :program:`mongod` instance running without -journaling that stops unexpectedly, you should always run the repair -operation before starting MongoDB again. +journaling that stops unexpectedly **and** you're not running with +replication, you should always run the repair operation before +starting MongoDB again. If you're using replication, then restore from +a backup and allow replication to synchronize your data. If the ``mongod.lock`` file in the data directory specified by :setting:`dbpath`, ``/data/db`` by default, is *not* a zero-byte file,