Jump to content

Recommended Posts

Posted (edited)

So I've been getting a sql database error for a few days, and I hadn't had time to deal with it. I come back tonight and see there is a new server release and I think this could solve my problem...and I install it. And now my entire userdatabase is gone....That is frustrating. Is there anyway to recover the database and prevent this from happening again?

 

[EDIT] After going back to look at the server I discovered it also completely eradicated my media database listing and is now in the process of scanning all of my library back in. Which will take a while

Installlog.txt

Edited by nghtwlkr
Posted

Damn you're fast...I discovered my problem. It's an idiot at keyboard issue. I did the server update as a different user than originally installed the server. I'm going to correct the problem and if it still has the SQL issue I'll post my logs for you

Posted

Thanks for reporting back.

Posted

Ok so I fixed the problem and still have the error as follows:

 

Scan media library failed.
2 minutes ago
Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
 
 

Serverlog.txt

Posted

Is this the right log from that timeframe? i don't see a library scan failure here. thanks.

Posted

Ok, try restarting the server and then starting a new library scan. if it still fails again, please attach the latest log. thanks.

Posted

Ok so Sqlite is throwing an error about the database file being damaged, and that also happens to be the one that holds the user data. But perhaps we can recover from this. The easiest way, if you have Emby Premiere, would be to install the backup plugin from the plugin catalog, configure the backup plugin, and then run a backup, and see if that succeeds. if that succeeds we can then proceed to delete your library.db file and start again.

 

Another option would be to shutdown emby server, download this DB Browser program:

 

http://sqlitebrowser.org/

 

Then open up the library.db file and delete all tables except for TypedBaseItems and DataSettings. Deleting a table is easy, you just right click on it -> delete table. Then save the file. If this succeeds you can then start emby server back up and run a library scan (which will take a little while).

 

Whichever route you take, make sure to make copies of the .db file first

C:\Users\Administrator\AppData\Roaming\Emby-Server\data\library.db

@@Happy2Play

Posted

Thank you very much...I'm going to tackle this after I get some sleep, and I'll let you know how it works. It will have to be the db edit path as I don't currently have Emby Premiere....for the moment at least....lol

Happy2Play
Posted

Ok so Sqlite is throwing an error about the database file being damaged, and that also happens to be the one that holds the user data. But perhaps we can recover from this. The easiest way, if you have Emby Premiere, would be to install the backup plugin from the plugin catalog, configure the backup plugin, and then run a backup, and see if that succeeds. if that succeeds we can then proceed to delete your library.db file and start again.

 

Another option would be to shutdown emby server, download this DB Browser program:

 

http://sqlitebrowser.org/

 

Then open up the library.db file and delete all tables except for TypedBaseItems and DataSettings. Deleting a table is easy, you just right click on it -> delete table. Then save the file. If this succeeds you can then start emby server back up and run a library scan (which will take a little while).

 

Whichever route you take, make sure to make copies of the .db file first

C:\Users\Administrator\AppData\Roaming\Emby-Server\data\library.db

@@Happy2Play

Won't the user need to the save the userdata table?

Posted

So I did as suggested but the problem presisted. So I decided to go for broke and deleted TypedBaseItems and DataSettings as well as the other tables. I wasn't worries about the userdatabase as that only really recorded the watched states of items for users rather than the user database. 

 

So far having wiped the slate has had an affect. I'm currently doing a library scan which has hung at 10.7% for a while, but I do see items being populated into the database slowly. 

 

Cross your fingers. I'll update you if it craps out on me.

Posted

Ok, if you don't care about watch data then you can just delete the entire library.db file.

Posted

Ultimately I don't. I care about a viable server. So far the server hasn't been up and running with mulitple users long enough for watch data to mean much. I may have to start a regular backup of my library db though if power outages can cause this corruption

Posted

ok, then i would just delete the file, start the server and run a library scan.

  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...