-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Restore failure - Unexpected EOF - retrieved data backup size exceed expected size #7198
Comments
Was the backup also created from a Btrfs system? And do you remember if you resized one of the affected VMs while the backup was in progress? |
Backups and restores all on Btrfs, and nope never resized during a backup.
…On 2 February 2022 11:37:41 pm UTC, Rusty Bird ***@***.***> wrote:
Was the backup also *created from* a Btrfs system?
And do you remember if you resized one of the affected VMs while the backup was in progress?
--
Reply to this email directly or view it on GitHub:
#7198 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
I have exactly the same problem with Qubes 4.1 fully updated today. Also Btrfs install. I have tried various combinations of backups: - AppVMs, templates - single, multiple. Always the same error as m4teh in the original post, on full restore or verify only: I have tried on multiple Qubes 4.1 Btrfs installs, different laptops all with same error. |
@tquest1 I assume that (same as for @m4teh) the backup was created from a Btrfs system, and
|
I don't really have a 'throwaway' install at the moment - but it does seem that it ALWAYS results in the same error on any Btrfs install - I have tried it on 2 colleagues' Qubes machines - with even a tiny VM of a few MB & it is always the same result from the gui. |
Okay I think I found the problem: When a VM is to be backed up, its disk usage value is queried and recorded in the backup metadata. This value is then used as an extraction limit during restore. But it's easy for the backup system to record a wrong value: For one thing, the query happens at the beginning of the backup run, but it might take hours until it's that particular VM's turn to be backed up. If more data is saved by the VM in the meantime, it can trigger this bug. The reason a mismatch would happen more often when backing up from e.g. Btrfs is that the 'file-reflink' driver (as well as the legacy 'file' driver) returns the live disk usage, whereas the 'lvm_thin' driver returns the committed disk usage. Maybe we could fix this by having storage drivers implement an There's also a similar problem for |
Should the restore code maybe just disable the byte size limit (not necessarily the file count limit) unconditionally, at least for hopefully well-authenticated format v4+ backups? This looks like it has always been racy, and it might take a while to fully fix, and even then some people will still have their existing backups with wrong size information. |
On Wed, Mar 09, 2022 at 08:08:24AM -0800, Rusty Bird wrote:
Should the restore code maybe just disable the byte size limit (not necessarily the file count limit) unconditionally, at least for hopefully well-authenticated format v4+ backups?
The size limit is to avoid filling the whole disk _before_
authentication step. Restore tool need to get a full file to
authenticate it.
But maybe we can change it to per-file size limit, since backup chunks
are limited to a constant size? (I seriously consider increasing chunk
size, but still, even setting the limit to x10 chunk size should be
rather safe).
…--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
|
One issue with this idea, is that But as said above, we can enforce the size limit in some different way (per-file, not per-volume or per-whole-backup). Those reported sizes are approximation anyway, because backup is then compressed. |
Volumes returned by `export()` must be immutable, since otherwise the backup will be inconsistent. Ensure this by exporting a snapshot of the volume, no the volume itself. Fixes QubesOS/qubes-issues#7198. FIXME: tests
Just wanted to say I've been experiencing this on a ext4 install as well. It really became a problem when I stopped compressing my backups. Compressing seems to greatly reduce if not eliminate this problem. |
Yep, makes sense. Sorry I haven't gotten around to implementing Marek's suggested per-file size limit yet. But |
Volumes returned by `export()` must be immutable, since otherwise the backup will be inconsistent. Ensure this by exporting a snapshot of the volume, no the volume itself. Fixes QubesOS/qubes-issues#7198.
Volumes returned by `export()` must be immutable, since otherwise the backup will be inconsistent. Ensure this by exporting a snapshot of the volume, no the volume itself. Fixes QubesOS/qubes-issues#7198.
Volumes returned by `export()` must be immutable, since otherwise the backup will be inconsistent. Ensure this by exporting a snapshot of the volume, no the volume itself. Fixes QubesOS/qubes-issues#7198.
Volumes returned by `export()` must be immutable, since otherwise the backup will be inconsistent. Ensure this by exporting a snapshot of the volume, no the volume itself. Fixes QubesOS/qubes-issues#7198.
Volumes returned by `export()` must be immutable, since otherwise the backup will be inconsistent. Ensure this by exporting a snapshot of the volume, no the volume itself. Fixes QubesOS/qubes-issues#7198.
Qubes OS release
4.1.0-rc3
Brief summary
Sporadic but majority failed restores (or corrupted backups) on 4.1x installations. Any size backup, small or large. Using Btrfs. Restoring on same version of Qubes, same and different systems.
Will restore AppVM but contain no data. Will display an error but conclude with "Finished successfully!", when it has not.
Only one reference to the same issue from 2017 found here https://groups.google.com/g/qubes-users/c/0i7RfWhoCxU
Backups and data do appear to restore successfully if running qvm-backup-restore --ignore-size-limit via dom0.
Forum issue discussion here - https://forum.qubes-os.org/t/backups-are-corrupted-on-restore/8446
Steps to reproduce
Create a backup and restore it.
Expected behavior
Successful restore containing all data with no errors.
Actual behavior
Restores empty AppVM containing no data, and errors contained in the output.
Unable to extract files, unexpected EOF in archive tar, retrieved data backup size exceed expected size
The text was updated successfully, but these errors were encountered: