Menu

UniFi Controller – Repair DB

October 27, 2018 - Server Maintenance
UniFi Controller – Repair DB

Tested on UniFi 5.9.29 on Debian 9

service unifi stop

ps aux | grep mongo

ps aux | grep java

mongod –dbpath /usr/lib/unifi/data/db –smallfiles –logpath /usr/lib/unifi/logs/server.log –journal

var days=0;

var dryrun=true;

/usr/bin/mongo –port 27117 < /root/mongo_prune_js.js

chown -R unifi:unifi /usr/lib/unifi/data/

service unifi start

tail -f /usr/lib/unifi/logs/mongod.log

tail -f /usr/lib/unifi/logs/server.log

Leave a Reply

Your email address will not be published. Required fields are marked *