|
3 | 3 | - Before using :dbcommand:`repairDatabase`, make a backup copy of
|
4 | 4 | the dbpath directory.
|
5 | 5 |
|
6 |
| - - Avoid running :dbcommand:`repairDatabase` against a replica set. |
7 |
| - If you are trying to repair a :term:`replica set` member, and you |
8 |
| - have access to an intact copy of your data (e.g. a recent backup |
9 |
| - or an intact member of the :term:`replica set`), you should |
10 |
| - restore from that intact copy (see |
11 |
| - :doc:`/tutorial/resync-replica-set-member`), and **not** use |
12 |
| - :dbcommand:`repairDatabase`. |
| 6 | + - Avoid running :dbcommand:`repairDatabase` and its wrappers against |
| 7 | + a replica set. To repair a replica set member when you have access |
| 8 | + to an intact copy of your data (e.g. a recent backup or an intact |
| 9 | + member of the :term:`replica set`), restore from that intact copy |
| 10 | + (see :doc:`/tutorial/resync-replica-set-member`). Specific to |
| 11 | + :option:`mongod --repair` and replica set members, if you run |
| 12 | + :option:`mongod --repair` against a replica set member and the |
| 13 | + operation modifies the data or the metadata, you must also perform |
| 14 | + a full resync of the member to rejoin the replica set. |
13 | 15 |
|
14 | 16 | - Only use the :dbcommand:`repairDatabase` command and associated
|
15 | 17 | wrappers, including :method:`db.repairDatabase()` and
|
16 | 18 | :option:`mongod --repair`, if you have no other options. These
|
17 | 19 | operations remove and do not save any corrupt data during the
|
18 | 20 | repair process.
|
19 | 21 |
|
| 22 | + - If repair fails to complete for any reason, you must restart the |
| 23 | + instance using the :option:`--repair <mongod --repair>` option. |
| 24 | + |
0 commit comments