RakDBA MongoDB Posts Recover a Standalone after an accidental Shutdown

Recover a Standalone after an accidental Shutdown

mongodb

Run the repair as user that normally runs mongod process to not changing the permissions of the MongoDB data files.

1) Create a backup of the data files.

2) Start mongod with –repair.

$ mongod --dbpath /var/mongodb/db --repair

Upon completion, the dbpath contains the repaired data files and an empty mongod.lock file.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments