Page 1 of 1

Repairing Serviio Database

PostPosted: Sat Oct 24, 2020 12:59 pm
by Derz
I have been using Serviio 2.1 for 6 months and am very happy, but there is one issue that has come up several times.

Accessing Videos from a Roku client, I can see/browse the "Folders" and "Movies" categories, but attempting to access "Series" results in the server hanging. Restarting the server permits me to again browse the "Folders" and "Movies" categories, but "Series" access remains a problem. The only way I have found to correct the issue is to remove the shared folder containing the "series" videos, then reattach it. Aside from being time consuming, information is lost in this process (last watched in series). Forcing a refresh of the library does not fix the issue.

I assume there is some corruption in database, but can not find a way to repair it in this or other forums. If there is, I'd like to try that. Otherwise, if there is a way to backup the database occasionally and restore it when needed would be helpful (an enhancement perhaps?).

Re: Repairing Serviio Database

PostPosted: Sat Oct 24, 2020 7:02 pm
by atc98092
Serviio uses a single connection version of Derby as the database. It cannot be opened by anything else while Serviio is running. If you shut Serviio down some DB clients can open Derby, such as Squirrel SQL. However, I wouldn't have the foggiest idea where to tell you to look. To my knowledge, there's no way to repair a Derby DB without extensive knowledge of SQL and the Serviio table format.

The recommended solution is to uninstall Serviio and do a clean install. Yes, you can back up the DB simply by making a copy of the DB folder, but just remember that you really can't restore a Serviio DB unless it's the same version of Serviio. The developer will often have to tweak something in the DB with a new Serviio version, so an older version of the DB won't work.

Re: Repairing Serviio Database

PostPosted: Mon Sep 19, 2022 8:09 pm
by Derz
The problem I noted in this thread went away when I "upgraded" my server from a Raspberry Pi Model 3 (Linux) to a Windows 10 PRO Mini PC (low power/7watt quad core J3710 Pentium).

That upgrade also permitted me to easily schedule a daily backup of the database library. Since that upgrade a year ago, I have had to recover the library twice. Both times were after an interrupted update to the metadata which takes a couple of hours for me. I strongly recommend regular backups of the database library. It can be done with Linux, it's just a bit more difficult.

Re: Repairing Serviio Database

PostPosted: Wed Sep 21, 2022 2:08 pm
by atc98092
florinevier wrote:Oh, I uninstalled it and lost half of the data. Then, it was a headache to log in again because they had a bug in the system for a long time. Serviio used to be my favorite server for streaming all media files, but now I'm more than disappointed. Two days ago, the exact situation happened with a huge data provider companies. In comparison with Serviio, their customer support restored access to the database quickly without losing any data. Why couldn't Serviio be the same responsive?

I'm uncertain what issue you have had. When you uninstall Serviio, the database is completely deleted. There's no retaining of any data, nor should there be. That's what an uninstall does, remove all remnants of the installed application. There's no data bug in Serviio that I've ever seen. I have two installs myself (I use one for testing purposes), as well as an installation at my daughter's home and my sister-in-law's home. They all run just fine, with no database errors after many years.