This article will outline how to repair a UniFi Video database under the Windows operating system. If you have our hardware NVR or another Linux variant, the article for repairing the database can be found here.
1. Stop the UniFi Video service (Right click on the icon in the notifications area and choose Stop)
2. Open Windows Explorer, browse to C:\ProgramFiles\unifi-video\data\db\journal. Delete all files within this folder, leaving the folder present, but empty
3. Open a command prompt as Administrator (+r, and type ‘cmd’. Right click on the command prompt and choose “Run as Administrator”)
mongod.exe --dbpath C:\ProgramData\unifi-video\data\db --repair
Once the command completes, it will bring you back to the command prompt. Wait until it has done so, before continuing to the next step.
6. Start the UniFi Video service (Right click on the icon in the notifications area and choose Start)