#Recover schedules after server crash
1 messages · Page 1 of 1 (latest)
the schedules shouldn't be empty assuming you didn't specifically disconnect jellyfin from etv (at which point it would have warned you)
can you clarify what you mean by crashed?
there might be a timing issue with etv and jellyfin, where if jellyfin isnt available on startup it won't be able to get the admin user id that it needs. you could try restarting etv after jellyfin is back up
but the trash system in etv should prevent schedules from clearing. its used when stuff cant be found locally and when stuff is removed from media servers
So, it's a home server, and I'm away right now. All I know is that when I remoted in today, the box seemed to have restarted (everything that was running like Jellyfin and ETV had stopped). I just stopped and restarted Jellyfin, but my collections and schedules are all still empty
Weirdly enough, one or two of the collections kept a small handful of their movies, but otherwise everything was wiped.
Can you dm me your log file from today? There's a logs subfolder in the config folder. Could also send the ersatztv.sqlite3 db if you want me to check that too. Def curious what happened
I'm on it 👍
So, it's possible that what happened is that since it's a Windows box (I know; big mistake), it underwent an automatic update since I can't shut those off
Either that or there was a power outage at the house.
ok, do you see a bunch of stuff on the trash in etv?
jellyfin gave a 401 (unauthorized) response, so etv deleted the api key from its jellyfin-secrets.json file in the config folder
there are 8500 media items in the db, so i think you could probably stop etv, delete the search-index folder, add the jellyfin api key into the secrets file, then start it up again
Yeah, when I first started it up, I saw a button that said "Fix Jellyfin Connection" or something like that, so I re-entered the API key
Yeah, just give me a quick sec
Ok, this schedule Superjim used to have TV shows as individual schedule items, as well as a collection called "Superjim Movies." Now it only has the collection.
Er, it's a multi-collection, but at any rate, the constituent collections were almost entirely wiped out
Some of the shows on the channel included The Tick, Invincible, My Hero Academia, etc.
Also, you probably have this information, but just in case, I'm running version v0.7.3-beta-win-x64
hmm. that stuff should only be removed from the schedule if the items themselves are removed from the database
I had an issue a few days ago where everything got wiped, but it's because I removed and reconnected the media source. I didn't do anything like that this time, so that shouldn't be related
so you recreated the schedules since then?
Yeah, I put them all back together. If I recall correctly, this was Tuesday of last week
how do you launch etv? is it possible that multiple instances were running?
And it was working fine between then and the crash
Hmm...I suppose it's possible. I just click the .exe file
It would be weird if multiple instances were running since it did retain some of the scheduling that I did
And I run it natively in Windows; no Docker container
unfortunately nothing jumps out at me. all i can suggest is to set log level to debug in etv's global settings and maybe it will happen again in the future (though i hope not). maybe backup your etv config folder after you get it configured the way you want it
Got it. Yeah, you answered the question that I was just going to ask haha!
It's not the end of the world, just a little annoying to punch everything back in again, but I'll keep the config folder backed up moving forward. The least I can do is be a guinea pig to help debug.
Thanks for talking me through this, and thanks again for all the work you do on this project. It's seriously a dream-come-true!
also, you might consider trakt lists or smart collections rather than manual collections since they survive removing media items and adding them back/or upgrading quality of items
trakt lists use guids like imdb tmdb ids, smart collections are search queries that are saved and (re-)evaluated as needed
I'll look into them. I didn't really know what they were so I didn't touch them.
I've pretty much been scheduling every TV show individually since I want some of them to play chronologically but others to shuffle (also different multiplicities)
Happened again. There was an outage at midnight, and all the schedules are wiped
I increased the logging level to debug, so hopefully this is a bit more helpful.
do you have some sort of filesystem snapshot configured?
Not that I know of
do you know why jellyfin returns 401/unathorized?
No clue. It seems like I always have to re-enter the API key
So, I did backup my config folder per your recommendation yesterday. Just finished extracting it, and everything was successfully recovered!
that's good. i'll test what happens when jellyfin returns unauthorized here, i dont think it would remove anything, but will confirm