nghtwlkr 0 Posted January 28, 2017 Posted January 28, 2017 (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 January 28, 2017 by nghtwlkr
Luke 42083 Posted January 28, 2017 Posted January 28, 2017 Hi, the update did not affect your user data, but most likely the sqlite errors you were experiencing before caused that. Do you happen to have emby server logs from those occasions? If you need help finding them, you can learn how to do that here: https://emby.media/community/index.php?/topic/739-how-to-report-a-problem/ Thanks !
nghtwlkr 0 Posted January 28, 2017 Author Posted January 28, 2017 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
nghtwlkr 0 Posted January 28, 2017 Author Posted January 28, 2017 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
Luke 42083 Posted January 28, 2017 Posted January 28, 2017 Is this the right log from that timeframe? i don't see a library scan failure here. thanks.
nghtwlkr 0 Posted January 28, 2017 Author Posted January 28, 2017 It's my most recent log. I'll give you the previous 3 logs as well. Serverlog 1 is the oldest. It dates back to when the server did not cause issues. Serverlog1.txt Serverlog2.txt Serverlog3.txt
Luke 42083 Posted January 28, 2017 Posted January 28, 2017 Ok, try restarting the server and then starting a new library scan. if it still fails again, please attach the latest log. thanks.
nghtwlkr 0 Posted January 28, 2017 Author Posted January 28, 2017 Here you go. I double checked my locations and made sure this is the correct log. Serverlog-Current.txt
Luke 42083 Posted January 28, 2017 Posted January 28, 2017 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
nghtwlkr 0 Posted January 28, 2017 Author Posted January 28, 2017 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 9783 Posted January 28, 2017 Posted January 28, 2017 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?
nghtwlkr 0 Posted January 29, 2017 Author Posted January 29, 2017 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.
Luke 42083 Posted January 29, 2017 Posted January 29, 2017 Ok, if you don't care about watch data then you can just delete the entire library.db file.
nghtwlkr 0 Posted January 29, 2017 Author Posted January 29, 2017 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
Luke 42083 Posted January 29, 2017 Posted January 29, 2017 ok, then i would just delete the file, start the server and run a library scan. 1
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