abbbi / virtnbdbackup

Backup utility for Libvirt / qemu / kvm supporting incremental and differential backups + instant recovery (agentless).
http://libvirtbackup.grinser.de/
GNU General Public License v3.0
341 stars 46 forks source link

Backup support for floppy / cdrom images. #61

Open madmax01 opened 2 years ago

madmax01 commented 2 years ago

Hello,

for opennebula VMs they use an hda which is raw for accessing contextualization File

is there an way virtnbdbackup can handle all "Images" based on an VM? raw + qcow2

if restoring the disk.0,......then disk.1 still missing to get the VM operativ

thx

Max

abbbi commented 2 years ago

see README: https://github.com/abbbi/virtnbdbackup#supported-disk-formats--raw-disks

virtnbdrestore has --raw option, too.

madmax01 commented 2 years ago

Hello,

i sure tried this out.

virtnbdbackup -d test-43 -l full -r -z -o /tmp/test/

but hda is getting skipped

"getDomainDisks [MainThread]: Skipping attached CDROM / Floppy: [hda]"

works qemu-img info disk.0 image: disk.0 file format: qcow2

skipped qemu-img info disk.1 image: disk.1 file format: raw virtual size: 364 KiB (372736 bytes) disk size: 364 KiB

abbbi commented 2 years ago

"getDomainDisks [MainThread]: Skipping attached CDROM / Floppy: [hda]" skipped qemu-img info disk.1 image: disk.1 file format: raw virtual size: 364 KiB (372736 bytes) disk size: 364 KiB

yes, because this is a type floppy or CDROM image, which virtnbdbackup does skip by default. I understand this might be an issue on opennebula where there is cloud-init related stuff on the cdrom image, but currently there is no option to forcefully include cdrom or floppy type images in the backup too.

Option would have to be introduced probably--include-optical and floppy / cdrom images would have to be copied to the target folder then too (like nvram/kernel images). But what happens if the device is an actual passed through cdrom device?

Pull requests welcome.