Backup didnt restore private volume

Today Qubes gave me a little sad:

Failed to restore volume private of VM thevmsname: Data import failed: not enough data (copied 35540434944 bytes, expected 35542532096 bytes)

  • I made the backup,
  • immediately checked its restore-ability (with positive result),
  • did sha512 checksum of the file… (file is still the same also transfered it to a another drive no chnage)

Two things i’d like to do now:

  1. provide logs for an issue in the issue repo so others dont face the same situation in the future.
  2. retrieve some files from (/rw)/home/user

Thanks for your time and patience in advance.

Update: the same VM is apparently not restoreable from a previous backup (other VMs in that file are restorable)

Sorry for this.
Please do raise an issue at GitHub when you have that information.

I have an idea what could cause this, which if it’s right would mean your backup file is fine and it’s just a bug in the restore code.

Are you trying to restore to an lvm_thin storage pool (the default installation layout), but the backup was created from a different type of storage pool (probably file-reflink, in other words a Btrfs or XFS installation)?

Let me know and we can probably figure out a quick workaround.


ahh good catch, yes the backup came from btrfs install and restore system is lvm.

strangely not all VMs are affected.

should i try to open the backup manually to retrieve the data? (couldnt find documentation, only threads on googlgroups)

The bug only affects VM volumes with a size that’s not divisible by 4 MiB. file(-reflink) volumes can have arbitrary sizes, while LVM Thin rounds up to the next multiple of 4 MiB, which currently confuses the restore code.

No need. I’m working on a proper fix, but if you want a quick and dirty workaround you can edit this line in the dom0 file /etc/qubes-rpc/admin.vm.volume.Import, changing

        error="not enough data (copied $bytes_copied bytes, expected $size bytes)"


        : error="not enough data (copied $bytes_copied bytes, expected $size bytes)"

That is, prefix it with a colon and a space character. This will ignore the spurious error and allow the VM to be restored. (Then change the line back after restoring, by removing the colon and space.)

It would be overkill in this case, but just for the record:


It’s fixed, you can watch issue #7176 to see when the bugfix becomes available for installation.


thank you and people involved so much, i didnt get the chance to test the workaround yet but will let you know one i get the next release of core admin client