UniFi Video - How to Repair a Database for Linux


This article will outline how to repair a UniFi Video database under the Linux operating system (includes our hardware NVR).  If you have the software installed on Windows, the article for repairing the database can be found here.


1. Stop the UniFi Video service

service unifi-video stop

2. Delete the contents of the journal folder

rm -rf /usr/lib/unifi-video/data/db/journal/*

3. Switch to the unifi-video user

su unifi-video

4. Run: 

mongod --dbpath /usr/lib/unifi-video/data/db --repair

5. Exit to return to root:


6. Start the UniFi Video service:

service unifi-video start

Related Articles