Page 1 of 1

Step- By-Step How to Rebuild Subsonic Database?

PostPosted: Fri Oct 21, 2016 11:30 pm
by dgood54
I believe I have a corrupt dbase and need to rebuild it. I've seen post after post of people recommending people to rebuild their dbase but I'm not finding the details for how to do that, at least to any degree that I'm following.

I NEED my Subsonic just like we used to need our MTV. Yeah, it ain't working. Help!

Re: Step- By-Step How to Rebuild Subsonic Database?

PostPosted: Sat Oct 22, 2016 4:14 am
by dgood54
Okay, the reason I wanted instructions for rebuilding my Subsonic database was I was seeing a lot of indications of a corrupted database and I couldn't find any clear instructions for rebuilding.

There were many signs that my dBase was corrupted but I ended up going to my C drive, finding the "db" folder under Subsonic (C:/subsonic) and moving the files within that folder elsewhere in case I needed to restore them.

I then went to the web interface via http://localhost:4040 (4040 or whatever port you have set for your access). My original login credentials still worked.

Anyway, once there, I went into Settings-->Media folders. The media folders I had had Subsonic pointing to were now gone so I re-entered those and then did the "Scan media folders now" operation. The scanning countdown showed the scanning was working, but things still didn't behave correctly. Note: Also gone were all Users, by the way.

Kept fiddling around trying different things. Eventually, and at wits' end, I tried deleting and then re-entering the media folders again (exactly as they had been entered before) and, voila! All my music suddenly showed up, without even rescanning (??)

So, in the end, I don't know if any of this will be the solution for anyone else, but somehow it was for me.

Good luck!

P.S. I still haven't seen clear instructions for rebuilding the dBase, but perhaps my haphazard approach (clearing the Subsonic db folder on my C drive of any files and then rescanning from the web interface) is the way (?).

Re: Step- By-Step How to Rebuild Subsonic Database?

PostPosted: Sat Nov 05, 2016 5:21 pm
by MikeLegit
My DB is corrupting nearly daily and I agree. There isn't any good recovery unless you have a backup, and that backup could have corrupt data. Otherwise you start over and try to enter your settings one-by-one. PITA! :roll:

Re: Step- By-Step How to Rebuild Subsonic Database?

PostPosted: Sat Nov 05, 2016 8:54 pm
by toolman
I'm running 2 Subsonic servers since nearly 3 years now and I never had a corrupt database.
Server 1: 4.026 artists 9.615 albums 33.935 songs 129,42 GB
Server 2: 2.370 artists 10.302 albums 141.838 songs 1190,85 GB
Allthough I admit that recovering all your settings isn't easy, it's not that Subsonic's database is that buggy that wou have to recover almost on daily basis.

Re: Step- By-Step How to Rebuild Subsonic Database?

PostPosted: Sat Nov 05, 2016 9:21 pm
by MikeLegit
It's something in the metadata of my music that is crashing it. How else do you explain two different installations that I've had over 3 years both failing now? I have crashplan so I restore the database back to earlier this summer, it works for a day and then corrupts again. There is no way two independent installs can fail at the same time and has to be in the metadata.

Re: Step- By-Step How to Rebuild Subsonic Database?

PostPosted: Sat Nov 05, 2016 10:06 pm
by toolman
So, actually you're saying that something in the tags of your music is causing the corruption of the database.
I know that a lot of my music files are very badly tagged with ridicoulous comments, weird genres like OldiesInstrumental, and strange yeartags like 02062006.
None of this has ever caused a corruption on either of my databases.
Perhaps there's a problem with your files or your filesystem. Did you ever check your drives for errors?

Re: Step- By-Step How to Rebuild Subsonic Database?

PostPosted: Sun Nov 06, 2016 6:47 am
by madhusker
I had checked fs and all good. I was able to restore a backup, but it corrupts right after a new scan. I saw some errors in the logs related to podcasts, so I restored the db, immediately deleted all podcast subscriptions before it scanned, and thus far I made it through the scan and 5 hours. I haven't changed any podcast subscriptions for 2 years...weird. We'll see if it stays stable a few days before I call this solved.

Re: Step- By-Step How to Rebuild Subsonic Database?

PostPosted: Sun Nov 06, 2016 5:15 pm
by madhusker
MikeLegit, let us know if removing podcasts like I did helps you out. My database has been corrupting too, and I've been about ready to setup a cron job to auto replace the DB with the backup and restart the service every couple of days. Chaps my A when I reboot the server and subsonic is dead. In my case, the database would corrupt, but still run ok until either the service was restarted, or the machine was rebooted. Once corrupt, the service starts and runs what appears to be normal, but you get the 503 error on the front page. As mentioned above, I removed all podcasts and have restarted the service several times successfully since doing that. Might be a fix for you too.