-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
SQLite corrupt DB recovery crashes autobrr on startup #1350
Comments
I was able to workaround this by letting autobrr initialize a fresh clean DB and then loading the recovered SQL into that DB:
I'm still unclear on why loading the recovered SQL into an uninitialized DB results in the fatal DB migration error. There may still be a bug there. In the meantime, hopefully this will be helpful to other users. Maybe add it to the docs? |
Hi! Do you have any logs from before the fatal log? This was with an existing db correct? And you are running the |
@zze0s No, I have no idea how long ago the corruption started, but I know it was at least long enough that no currently available logs cover it. Sorry.
Yes.
That's copied from this project's README. I agree that part of the README should be updated. Unfortunately, I don't see any tag in this project's registry that would keep current with the latest final release. Something should be added to the build process to tag final releases with a separate tag. It should also probably tag major, and maybe even minor versions. |
Alright, then it's hard to conclude anything. Are you storing the data on a NFS mount or similar? SQLite does not work well with that. I do not think it was anything with the update that broke it and instead suspect something with your environment.
I don't see us changing from A lot of people are running auto-update tools with docker/containers and so far I have not heard of any DB corruption issues like yours with those that got it auto updated, so that's a relief. We can keep this open for a couple more days but then I'll close it and only use as a reference, and update the docs with your recovery instructions. |
FWIW, the original cause of the corruption may have been exhausted disk space. But this issue isn't about the cause of the corruptionm it's about autobrr choking on the recovered DB.
Hehe, so why did you comment on my use of the |
As discussed in the other issue the tag issues has already been resolved. The recovered db issue not working as intended I think might be because we use a SQLite built-in key-value sort of store, |
Version
Describe the bug
When the
/config/autobrr.db
SQLite DB becomes corrupt, it can't be recovered using the standard SQLite.recover
command because the resulting recovered DB crashes autobrr on startup with the following error:To Reproduce
Steps to reproduce the behavior:
.recover
SQLite command on the corrupt DB:Expected behavior
Some method of DB recovery should be supported, preferably one that uses standard, well supported SQLite recovery tools.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: