Skip to content

tutorial: mongo repair should be carried out by the mongodb user #1432

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
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ unexpected shutdown:
Procedures
~~~~~~~~~~

The following procedures should be carried out with the permissions of your usual
mongodb user (typically user name `mongodb`). On linux systems this can usually be acheived
with the `-u` and `-g` options of the `sudo` command. If you forget to do this,
you can change the ownership of the mongodb data files after repair is complete.

To repair your data files using the :option:`--repairpath <mongod --repairpath>`
option to preserve the original data files unmodified:

Expand All @@ -139,7 +144,9 @@ option to preserve the original data files unmodified:
mongod --dbpath /data/db0

Once you confirm that the data files are operational you may delete
or archive the data files in the ``/data/db`` directory.
or archive the old data files in the ``/data/db`` directory. You may
also wish to move the repaired files to the old database location or
edit mongodb.conf to indicate the new location.

To repair your data files without preserving the original files, do
not use the :option:`--repairpath <mongod --repairpath>` option, as in
Expand Down