Skip to content

DOCS-1291 adding context to databaseRepair warning #1200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions source/includes/warning-repair.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.. warning::

In general, if you have an intact copy of your data, such as
would exist on a very recent backup or an intact member of a
:term:`replica set`, **do not** use :dbcommand:`repairDatabase`
or related options like :method:`db.repairDatabase()` in the
:program:`mongo` shell or :option:`mongod --repair`. Restore
from an intact copy of your data.
During normal operations, the :dbcommand:`repairDatabase()`
command and wrappers including
:method:`db.repairDatabase()` in the :program:`mongo` shell and
:option:`mongod --repair` should only be used to compact database
files and/or reclaim disk space. Be aware that any corrupt data
will be removed (and lost) during the repair process.

If you are trying to repair a :term:`replica set` member, and you
have access to an intact copy of your data (e.g. a recent backup or
an intact member of the :term:`replica set`), you should restore
from that intact copy, and **not** use :dbcommand:`repairDatabase`.