-
Notifications
You must be signed in to change notification settings - Fork 277
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
pkg: sqlite error while executing PRAGMA user_version; in file pkgdb.c:2357: database disk image is malformed #2072
Comments
That's a few days old. I'm almost certain that this morning, I completed an upgrade of various packages |
nothing we can do about it, your database is corrupted, the last backup is 2 days old |
Thanks, that's unlucky. I did my best to tune UFS for data to be at minimal risk ( If I were to restore from the backup, to have a database that is (a) non-corrupt but (b) not a true reflection of what's installed, I guess that would be a terrible idea. Terrible, true? Afterthought: restore, |
Should the rollback journal guard against corruption in this situation? Forced stop analogous to loss of power. https://www.sqlite.org/tempfiles.html#rollbackjrnl (Do I misunderstand what's there?) |
just restore your 1 day old database and rerun pkg upgrade, you will be in a sane situation again. I don't know how you ended up in the corrupted situation this is very rare and yes the rollback should have happened, not being on your box and able to reproduce it is hard do diagnose. I have been trying to reproduce your case and I can't find a way to actually corrupt, by killing abruptly VMs or physical machines. |
Why did I not think of that? :-) thank you.
As you say, extremely rare, however you might increase the risk of corruption by doing a couple of things that I did not:
Happy to discuss elsewhere, if ever the mood takes you. Somewhere file system-related. |
On Sat, Sep 17, 2022 at 11:54:58AM -0700, Graham Perrin wrote:
I restored once, then encountered an error following `pkg upgrade`.
Restored again, what's pictured below is (I think) the same error:
![image](https://user-images.githubusercontent.com/192271/190872288-1e82d1ce-b710-474f-b2f7-8cb0c38da4ea.png)
--
Reply to this email directly or view it on GitHub:
#2072 (comment)
You are receiving this because you modified the open/close state.
Message ID: ***@***.***>
xzcat /var/backups/pkg.sql.xz | pkg shell
I need to kill backup/retore function. backup restore do another kind of backup
Bapt
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
After a few difficulties, I did some weird Then this, as root:
Are |
A VirtualBox guest with FreeBSD 12.3-RELEASE-p7 stopped responding whilst pkg-install(8) awaited a y/n response:
A forced stop of the guest was required, the UFS file system is reportedly clean, I'm left with a malformed image:
In a situation such as this, is recovery possible?
Output from
ls -ahlrt /var/backups
:TIA
The text was updated successfully, but these errors were encountered: