Skip to content

Commit 1087015

Browse files
author
Sam Kleinman
committed
DOCS-385 change to clarifiy recovery on replica sets
1 parent 079ac75 commit 1087015

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

source/tutorial/recover-data-following-unexpected-shutdown.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ milliseconds by default, and ensures that MongoDB will be able to
1515
recover a constant state even in the case of an unclean shutdown due to
1616
power loss or other system failure.
1717

18-
If you do not have journaling enabled, use the following procedure to
19-
recover data that may be in an inconsistent state.
18+
If you are *not* running as part of a :term:`replica set` **and** do
19+
*not* have journaling enabled use the following procedure to recover
20+
data that may be in an inconsistent state. If you are running as part
21+
of a replica set, you should *always* restore from a backup or restart
22+
the :program:`mongod` instance with an empty :setting:`dbpath` and
23+
allow MongoDB to resync the data.
2024

2125
.. seealso:: The ":doc:`/administration`" documents and the
2226
documentation of the :setting:`repair`, :setting:`repairpath`, and
@@ -34,8 +38,10 @@ Indications
3438
~~~~~~~~~~~
3539

3640
When you are aware of a :program:`mongod` instance running without
37-
journaling that stops unexpectedly, you should always run the repair
38-
operation before starting MongoDB again.
41+
journaling that stops unexpectedly **and** you're not running with
42+
replication, you should always run the repair operation before
43+
starting MongoDB again. If you're using replication, then restore from
44+
a backup and allow replication to synchronize your data.
3945

4046
If the ``mongod.lock`` file in the data directory specified by
4147
:setting:`dbpath`, ``/data/db`` by default, is *not* a zero-byte file,

0 commit comments

Comments
 (0)