Skip to main content
Documentation & User Guides | Fotoware

Repairing the MongoDB database after an unclean shutdown


The MongoDB database may require a repair after an unclean shutdown. Here's how to perform the repair.

Note: The official MongoDB documentation on repairing a MongoDB instance is found here:

We recommend studying the above document before you proceed so you understand the effect of a repair operation.

Things to note before performing a database repair:

  • Sufficient disk space is required to perform the database repair - in extreme cases, a repair requires as much space as currently occupied by the MongoDB database.
  • Repairing the database results in Fotoware downtime
  • A repair may free up disk space used by the database files and are no longer needed, and is the only way to free up space taken up by the database.

Steps to repair the database

Open an elevated command prompt  (Run as Administrator) on the Fotoware server and go to the Fotoware program folder containing the mongodb executables:

cd C:\Program Files (x86)\FotoWare\FotoWeb 8.0\MongoDB

Execute the following command to repair the MongoDB 

mongod --dbpath C:\ProgramData\FotoWare\FotoWeb\Operations\MongoDBData --repair 

Note that the -- dbpath option is followed by the path to the default location of the MongoDB instance used by Fotoware.