jriker1 21 Posted August 9, 2016 Posted August 9, 2016 (edited) I am using Emby Server and also use Emby with my Xbox 360. Recently I went to watch a movie and did my usual choice to filter out any movie already watched. I was seeing a lot of odd items still being shown I knew I saw. When I switched off the filter, out of my hundreds of movies, only 6 were still showing the watched checkbox. Any idea what happened and any way to get things back? Note all my servers are backed up so if there is something I need to restore I can do that. Thanks. JR Edited August 9, 2016 by jriker1
Luke 42081 Posted August 9, 2016 Posted August 9, 2016 I would check again, and compare to the web interface. Thanks.
jriker1 21 Posted August 13, 2016 Author Posted August 13, 2016 (edited) I would check again, and compare to the web interface. Thanks. Same deal in the web interface. I can say I was painfully able to reproduce this and it makes no sense. All my movies are on an external SAS connected raid enclosure. They never move. I moved to a new primary Emby server, however the drive configurations were still the same, C: for the boot, D: for the data, and then E: for the movies. As mentioned E: never changed same raid controller just moved the card to the new computer and attached the enclosure to it. Still the E: drive. I did a physical restore of a backup I did 30 seconds before shutting the old computer down and restore to the new hardware C: and D:. Came up and didn't even notice the difference other than a few drivers. OK so it's the restore right? Well I just backed up the server, and did a restore on top of itself. So this time same hardware, same software. System powered up and all good, except there again were just a handful of videos flagged as watched. What would cause this? Note dates of the files and everything on the E: drive are still the same. So if a movie was added in 2015 it still shows that 2015 date on the folder name, and files. Thanks. JR Edited August 13, 2016 by jriker1
Luke 42081 Posted August 13, 2016 Posted August 13, 2016 If you set a watch status now do you eventually lose it again? is this something that happens regularly or was it only a one-time thing?
jriker1 21 Posted August 13, 2016 Author Posted August 13, 2016 (edited) I will have to wait and see and report back, however I can reproduce this every time I restore my boot drive on the computer Emby server runs so would say this will happen anytime I do a system restore, should I need to, which begs the question what isn't being restored when I restore the system? I can literally do a backup which is full metal, then immediately restore it and the watched setting is reset. How does that setting get set/saved normally? Ang guess I can ask the question also of why there are a handful of shows that maintain the watched status? Thanks JR Edited August 13, 2016 by jriker1
Luke 42081 Posted August 13, 2016 Posted August 13, 2016 so you are doing a restore on the drive that contains the emby server database?
Happy2Play 9783 Posted August 13, 2016 Posted August 13, 2016 I will have to wait and see and report back, however I can reproduce this every time I restore my boot drive on the computer Emby server runs so would say this will happen anytime I do a system restore, should I need to, which begs the question what isn't being restored when I restore the system? I can literally do a backup which is full metal, then immediately restore it and the watched setting is reset. How does that setting get set/saved normally? Thanks JR Could this be an issues where the backup is trying to capture the changes in an open database. Do you get the same results if you shut down Emby so the databases are closed and do a backup and restore?
Luke 42081 Posted August 13, 2016 Posted August 13, 2016 ^ Yes that's a good question there from Happy2Play. Apart from that the only other thing I can think of is restoring an old database onto a newer version of Emby Server, which means you need to go through the database upgrades again.
jriker1 21 Posted August 16, 2016 Author Posted August 16, 2016 (edited) Thanks for the replies and probably won't give the answers you need. As for if I'm restoring the drive Emby is on, if that database is kept in the installation folder than yes. I went to look where it was installed and oddly couldn't directly find it. Is it really installed in the installers roaming profile? Found the install in C:\Users\jriker\AppData\Roaming\MediaBrowser-Server\System. Didn't see a "db" in there at first glance. Open DB issue? Hmmm. Maybe however unfortunately two things. First Microsoft Essentials Server 2012 R2 backup doesn't allow for "scripted" backups so wouldn't be able to shutdown Emby, backup, and start it back up on a normal situation. Though historically in doing upgrades Emby does not shutdown well (take a LONG time before it truly shuts down) so chances are that would fail anyway. Second I am now all up and running so really won't be doing another restore just to try this. Primary domain controller so every restore is risky, especially if it's just to test. With being an old DB, no, I backed up where I was at, shutdown the server, and did an immediate restore of what I just backed up. Do we know why there are a handful of movies that still maintain their watched status during this? Same ones both times. Keep in mind it's been MANY years I've been using MB/Emby so curious on those if there is an "old school" way of flagging watched that is still in place on some of those movies. Note once I hear back, and if there is a good way to shutdown Emby and make sure it's shutdown, and I can find out if the primary server backup can pass a script or something to shut things down before it backs up, may reconsider restoring the system again. Thanks. JR Edited August 16, 2016 by jriker1
jriker1 21 Posted August 16, 2016 Author Posted August 16, 2016 Figured I'd separate this as my other response was getting long in the teeth as some say. Assuming you gathered from my other response I am curious where the DB is, is there any dump scripts that can be run? I know with MySQL we always did a DB dump which was essentially a massive text file and backed that up. Thanks. JR
jriker1 21 Posted August 17, 2016 Author Posted August 17, 2016 (edited) Found it yesterday but oddly the library.db file is not liked much. I tried opening each file with sqllite3 and it was fine. Scary the limited data that is kept in so many files, but the library.db file specifically sqllite3 said was not valid and couldn't open it. Specifically says "Invalid file format". Guessing technically that's where the data is that tells what's watched? Edited August 17, 2016 by jriker1
ebr 16187 Posted August 17, 2016 Posted August 17, 2016 No, that isn't where watched status is stored (it is in userdata) but I'm not sure you digging directly into the db is going to tell you much. If you tried to access the db while Emby was running that may be why it didn't work.
Luke 42081 Posted August 17, 2016 Posted August 17, 2016 Found it yesterday but oddly the library.db file is not liked much. I tried opening each file with sqllite3 and it was fine. Scary the limited data that is kept in so many files, but the library.db file specifically sqllite3 said was not valid and couldn't open it. Specifically says "Invalid file format". Guessing technically that's where the data is that tells what's watched? We open the database in exclusive mode which means other programs cannot open it at the same time.
jriker1 21 Posted August 24, 2016 Author Posted August 24, 2016 No judgment, however since this is the only thing my bare metal backup isn't backing up right, is my flawed process to set a scheduled task to shutdown Emby at 10:45 (server backs up at 11) and hope it shuts down, and then like 1:00AM restart emby? That way I will in theory get a cleaner backup? Thanks. JR
Luke 42081 Posted August 24, 2016 Posted August 24, 2016 What if you just stop doing the restore, do you still lose your watch state?
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