systemctl stop unifi
----
===== Stop the Mongo Service =====
service mongodb stop
----
===== Repair the Database =====
mongod --dbpath /usr/lib/unifi/data/db --repair
----
===== Start the Database =====
service mongodb start
----
===== Start Unifi =====
systemctl start unifi
----