backup single disk in VM

weicloud_chw

New Member
Aug 15, 2021
2
0
1
63
Hi every one
I have a VM and use 2 VM disk img (qcow2)
and storage is directory mode

0012_10.png

I only want online backup vm-100-disk-0.qcow2

I use
Code:
qemu-img convert -f qcow2 -O qcow2  vm-100-disk-0.qcow2   backup.qcow2
and VM boot from backup.qcow2 will got filesystem error


does there have another why can use ?
 
Last edited:
You can exclude a virtual disk from backup by unchecking the Backup option (select the Hard Disk and press Edit), and then use the Backup-screen (5 below Hardware) to create a backup of the VM without that virtual disk.
Is there a particular reason to why you use the command line to create a copy of a virtual disk using qemu-img? If you only want a copy, why not use the Linux command cp?
 
You can exclude a virtual disk from backup by unchecking the Backup option (select the Hard Disk and press Edit), and then use the Backup-screen (5 below Hardware) to create a backup of the VM without that virtual disk.
Just keep in mind that PVE will destroy the virtual Disk that you excluded from Backup without asking if you try to restore the VM from backup.
 
  • Like
Reactions: Analog Mind
Just keep in mind that PVE will destroy the virtual Disk that you excluded from Backup without asking if you try to restore the VM from backup.
Last time I restored over an existing VM, it kept the virtual disk that was not backed up and all I had to do was reattach it (to the virtual SCSI controller).
 
  • Like
Reactions: DerDanilo
Last time I restored over an existing VM, it kept the virtual disk that was not backed up and all I had to do was reattach it (to the virtual SCSI controller).
I think it happend with PVE6.2 or 6.3. Not sure if it was a LXC or a VM. I think a VM.
I got a guest with alot of data and because vzdump is so wasteful I created that guest with a small root virtual disk for the OS (incuded in backup) and a big virtual disk for the data (excluded from backups). I always did a backup prior to upgrading my guests OS so I would be able "rollback" the root disk in case of a failure. In case of a failure I thought I will restore the VM from the backup storage and because the data disk is excluded it will only overwrite the root disk with the one from the backup and create a new VM with only the root disk so I could later manually attach the old data disk. But that wasn't how it worked. As my linux upgrade failed I did a backup restore overwriting the guest and that deleted my excluded datadisk. I'm not sure if it just deleted the data disk or if it had overwritten it with an empty 0 Byte disk. I think the latter was the case because if I remember it right the excluded disk was still there but just empty now.
 
Last edited:
You can exclude a virtual disk from backup by unchecking the Backup option (select the Hard Disk and press Edit), and then use the Backup-screen (5 below Hardware) to create a backup of the VM without that virtual disk.
Is there a particular reason to why you use the command line to create a copy of a virtual disk using qemu-img? If you only want a copy, why not use the Linux command cp?

thank you
I don't know can exclude virtual disk , use this way with vzdump to backup work fine

I was try cp before
virtual disk 's filesystem got error too
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!