-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All episodes are lost and rescanning is broken due to unique constraint #1085
Comments
Can you elaborate what happened here? That's certainly not normal. Shoko only makes auto backups when the schema updates, so your backup may be fairly old. If you have another system that backs it up (you should if you want to have auto updates), then you may be safe. If you have a backup, try it, obviously. The change that would matter for that constraint failure happened in January. Nice one... If you are going to have auto updates, you should also keep an eye on the logs once in a while. It's probably been bleeding errors this whole time. I would also recommend being in our discord and letting |
Oh right. The solution for the constraint issue...run this query in SQLite Studio: DROP INDEX UIX_AniDB_FileUpdate;
CREATE INDEX IX_AniDB_FileUpdate ON AniDB_FileUpdate(FileSize, Hash); |
CrossRef_File_Episode is where the mappings that define a file as recognized live. AnimeEpisode being empty is a bad sign though. Is AnimeSeries ok? If that's ok, you might be able to recover it by running Update All AniDB Info |
He might have used one of the faulty episode 'fixes' that were later fixed but required restoring from a backup i did a few weeks(/months?) back. |
Things to learn from this; don't enable auto update. |
Oh.... Didn't know there was an issue like that. |
Well I guess I'll add the episode count to my monitoring stack and alert on it. Auto update has mostly worked so I'll leave it and backups are always close by. (ZFS snapshots have saved me so many times) I have recovered and it did seem to be some problem in the last month but at least the current daily did not break it. (It has happened some time after august 7.) I don't really feel like bisecting since it seems to be fixed. |
VERSION INFORMATION
Server Version: shokoanime/server:daily@sha256:cf77e24b0d0ec8fd593f1b382a54915db50c8524058ed11ff956cf6640cc2f9d
4.2.2.0 (7505d51)
LOG FILE
Log example
DESCRIPTION
All episodes were lost a couple days ago. (All files are in the unrecognized list)
A rescan gives a ton of errors like the one in the log example. Not so sure what happened.
STEPS TO REPRODUCE
Run the server in an auto-updating fashion (my bad) and then it just kills all episodes (I notices since Jellyfin also turned up empty). All shows are still listed in the web ui, but all without content.
I'll try to grab full logs from the last restart (3 days ago I believe) when I'm home this weekend. And I believe the server makes database backups, so maybe I'm still fine.
The text was updated successfully, but these errors were encountered: