dcol 173 Posted November 18, 2019 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
Solution riothamus 52 Posted November 18, 2019 Solution 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
dcol 173 Posted November 18, 2019 Author 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
dcol 173 Posted November 18, 2019 Author 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.
Luke 40111 Posted November 21, 2019 Posted November 21, 2019 https://emby.media/community/index.php?/topic/75510-42032-vacuum-database-config-switch
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