How to Repair a Database on Debian-based Linux
1. Stop the UniFi service
service unifi stop
2. Repair the database with this command:
mongod --dbpath /usr/lib/unifi/data/db --smallfiles --logpath /usr/lib/unifi/logs/server.log --repair
3. Finally, restart the UniFi service:
service unifi start
NOTE: If this process was performed as root the file ownership may have changed. This can be changed with: chown -R unifi:unifi /usr/lib/unifi/data/db/ chown -R unifi:unifi /usr/lib/unifi/logs/server.log |
If you still have suspected database issues please contact Ubiquiti Support.