KVM backups

tuxillo

Renowned Member
Mar 2, 2010
57
6
73
Hi,

Is it possible to backup a KVM virtual machine partially? I mean, including some disk and other not.
I'm using a volume group as the main storage for the virtual machines.

Thanks,
Antonio
 
no, vzdump (GUI backup) takes all associated disks.
 
(sorry to hijack)

So if I have a machine with two disks and a CDROM that is mapped to an ISO, does the tgz file include the contents of the CDROM as well?
 
Thanks Tom,

Is there any other method I could use in the command line for example? The procedure I am following now is to stop the VM, unlink the disk from it, backup and then re-add the disk to the VM.

Is it planned to have a similar feature added to the GUI in the future?

Cheers,
Antonio
 
currently no plan to change this I added this request to the wish list.
 
(sorry to hijack)

So if I have a machine with two disks and a CDROM that is mapped to an ISO, does the tgz file include the contents of the CDROM as well?

no, ISO images are not in the backup (only the configuration pointing to the ISO).
 
no, ISO images are not in the backup (only the configuration pointing to the ISO).

then why are backups failing, since i moved ISO storage to NFS?

FAILED00:00:04volume 'local:iso/debian-503-i386-businesscard.iso' does not exist
 
you restored the VM, and now you cannot start as the debian-503-i386-businesscard.iso is not in the local storage.

=> remove this from the the VM via the hardware tab.
 
hi tom, actually i'm not having problems with it. removed the cd drive, since it's only for install, anyway. i just wanted to point out, that backup has problems without the iso, because you said isos don't get backed up. why do they fail then?
 
backup does not fail. you are talking about restore - and this does also not fail, it restore the config. but if the new environment does not have the local iso image you will get the notice that the vm cannot start - but this does not mean that the backup or the restore is failed, you mix up the facts.
 
Not quite Tom - I get failures as well if the local ISO cannot be found. For example, this is from the email:

1112 XYZ.com FAILED 00:00:00 volume 'local:iso/debian-3.iso' does not exist

I don't know whether the backup actually worked or not (as in I don't know if the tgz file is actually there), but the email says no...
 
backup does not fail. you are talking about restore - and this does also not fail, it restore the config. but if the new environment does not have the local iso image you will get the notice that the vm cannot start - but this does not mean that the backup or the restore is failed, you mix up the facts.

i'm talking about backup - honestly!
the message above is from the backup-mail.
some more context is:
101: Mar 04 13:02:20 INFO: Starting Backup of VM 101 (qemu)
101: Mar 04 13:02:20 INFO: stopped
101: Mar 04 13:02:20 INFO: status = stopped
101: Mar 04 13:02:21 INFO: backup mode: stop
101: Mar 04 13:02:21 INFO: bandwidth limit: 10240 KB/s
101: Mar 04 13:02:22 ERROR: Backup of VM 101 failed - volume 'local:iso/proxmox-ve_1.4-4390.iso' does not exist
 
now I know what you mean. the backup task verifies if the iso is accessible - if no, the backup does not start. I will file a bug.
 
currently no plan to change this I added this request to the wish list.
I will cast a vote on this as well.

Assuming that it is more performance efficient to add a hd into a vm, than it is to make a fileserver vm and using NFS to/from the target vm (on same host)?
 
Is it possible to backup a KVM virtual machine partially? I mean, including some disk and other not.

It seems doable to remove/rem the disk lines (i.e. "virtio1: /dev/sdc1" etc) from the VMID.conf file (with the VM running), do a manual vzdump snapshot and then re add the lines in the conf file.

Is this safe? How often and by whom is the conf file read? Only on startup and by vzdump thus leaving the VM and host happily unaware of my unholy fiddling??

jan
 
perhaps it's possible to implement the config-change in a hook-script that's provided by 'vzdump --script '. just a quick hint, without having tested weather any of the phases are useful for this.
 
perhaps it's possible to implement the config-change in a hook-script that's provided by 'vzdump --script '. just a quick hint, without having tested weather any of the phases are useful for this.
Perhaps...
What I've done is make two .confs: a .conf.real (with the disks) and a .conf.backup (without). Then in crontab an entry with cp, vzdump, cp. I doubt it gets any simpler than that.
 

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!