dcol 165 Posted November 18, 2019 Share Posted November 18, 2019 (edited) I would like to request a library DB cleanup tool/utility within Emby. Seems a lot of missing, old, and duplicate entries cause many of the users issues. Especially if you move or change entire libraries. And I know the DB can grow to an unnecessary large size assuming a lot of waste in there. My library DB alone is over 1GB in size. I have seen users post 'cleanup the DB' never stating how or where to find this utility. Seems to me that a lot of issues on this forum can easily be solved this way. Can even be a plugin, I guess, if some savvy user wants to take it on. Edited November 18, 2019 by dcol Link to comment Share on other sites More sharing options...
Solution riothamus 51 Posted November 18, 2019 Solution Share Posted November 18, 2019 (edited) This basically does exist, just not in a very easy to find manner: https://emby.media/community/index.php?/topic/75510-42032-vacuum-database-config-switch/ I do agree that a check-mark box or something would be handy. Many of us just use a cron-job or some other mechanism to fire this process off. As an example, here is my script that I have in /etc/cron.monthly: #!/bin/bash ls -lh /var/lib/emby/data/library.db > /root/emby-db-clean.txt systemctl stop emby-server.service xmlstarlet ed --update "/ServerConfiguration/VacuumDatabaseOnStartup" --value true /var/lib/emby/config/system.xml systemctl start emby-server.service sleep 30 ls -lh /var/lib/emby/data/library.db >> /root/emby-db-clean.txt Edited November 18, 2019 by riothamus 1 Link to comment Share on other sites More sharing options...
Luke 37192 Posted November 18, 2019 Share Posted November 18, 2019 This is already built into the server. Link to comment Share on other sites More sharing options...
dcol 165 Posted November 18, 2019 Author Share Posted November 18, 2019 (edited) Thanks @@riothamus , but I use Windows. Ok found it system.xml file and set VacuumDatabaseOnStartup to true Edited November 18, 2019 by dcol Link to comment Share on other sites More sharing options...
dcol 165 Posted November 18, 2019 Author Share Posted November 18, 2019 Ran it. Took 20 seconds before log showed 'Info App: Core startup complete' reduced DB from 980MB to 530MB. Probably a good thing to use when you make major library changes like reorganizing folder structures. Link to comment Share on other sites More sharing options...
Luke 37192 Posted November 21, 2019 Share Posted November 21, 2019 https://emby.media/community/index.php?/topic/75510-42032-vacuum-database-config-switch Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now