Hello,
I have recently started using kopia (since today on 0.9.7), great stuff and a job very well done. I had an issue that forced me to restore a file from a snapshot I took a few days back. It’s a VirtualBox .vdi file and it is about 61 GB in size. However when I restore it from the snapshot I get a file back of only about 6 GB in size and the associated VM can not be started. Any ideas?
I investigated a bit more. I had another backup of this appliance that I exported a while back and used that to rebuild the VM, this time with .vmdk-type storage. Took a new snapshot and restored the .vmdk file from this snapshot. Again, it is much smaller than the original size (that is reported correctly inside the snapshot). The tail end of the original file is proably filled with zero bytes, at least the restored file is identical with the initial part of the original file. But I cannot add the restored file as an additional hard disk in the Virtual Media Manager of VirtualBox, so that is an issue.
The backup could be corrupted. Try to verify your backup.
kopia content verify --download-percent=100
In that case I would expect the restore operation to fail or give an error message, surely kopia keeps checksums somewhere on the files in the snapshots. Anyway, I ran the content verify and to my surprise it did give a few errors, but not for the object ID associated with the file above.
I tried once more and it seems there really is a bug:
- cksum W10.vmdk
3561670311 41450077696 W10.vmdk - take snapshot
- restore W10.vmdk from snapshot to another directory
- cksum W10.vmdk
2373394046 5810946048 W10.vmdk
Before I used kopia-ui to restore the file. It appears that if I use the command-line it does in fact give an error message:
kopia snap restore Ixabfccf54e4e9d7ea03e512f17fcbe440 W.vmdk
Restoring to local filesystem (/home/tim/VirtualBox VMs/W.vmdk) with parallelism=8…
Processed 1 (41.5 GB) of 0 (0 B).
Processed 1 (41.5 GB) of 0 (0 B).
ERROR error restoring: restore error: error copying: copy file: error creating file: cannot write data to file %q /home/tim/VirtualBox VMs/W.vmdk: unexpected content error: invalid checksum at pa5190818ff2111415fca73985f03e96c-s2359b651467229eb10b offset 17143834 length 2144282/2144282: decrypt: unable to decrypt content: cipher: message authentication failed
How old is the repository? How frequently do you make snapshots? What is the underlying file system for the repo?
It’s brand new, I submitted this as a bug as well, #1570, there you can find a transcript. All filesystems involved are ext4 on Ubuntu 21.10, kernel 5.15.5.
Ok, will discuss on the bug. Thanks.
It appears that the issue was caused by a defective memory bank in my system.
Glad this was sorted out.