KVM and vzdump - Exclude from a backup some virtual disk

Comune di Levico Terme

Renowned Member
Dec 18, 2008
51
1
73
Hi, i have a virtual machine KVM with 3 virtual hd.

It's possible, using vzdump, exclude two of the three disks from the backup ?

these is my proxmox configuration:
pveversion -v
pve-manager: 1.5-10 (pve-manager/1.5/4822)
running kernel: 2.6.32-2-pve
proxmox-ve-2.6.32: 1.5-7
pve-kernel-2.6.32-2-pve: 2.6.32-7
pve-kernel-2.6.24-10-pve: 2.6.24-21
pve-kernel-2.6.18-2-pve: 2.6.18-5
qemu-server: 1.1-16
pve-firmware: 1.0-5
libpve-storage-perl: 1.0-13
vncterm: 0.9-2
vzctl: 3.0.23-1pve11
vzdump: 1.2-5
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.12.4-1
ksm-control-daemon: 1.0-3

and these is the command that I use:
vzdump --node 1 --snapshot --compress --storage backup 400

i'm trying to use something these:
vzdump --node 1 --snapshot --compress --storage backup400 --exclude-path "/var/lib/vz/images/400/vm-400-disk-1.qcow2" --exclude-path "/var/lib/vz/images/400/vm-400-disk-2.qcow2" --exclude-path "/var/lib/vz/images/400/vm-400-disk-3.qcow2" 400

but I think that the --exclude-path is valid only for OpenVz machine !?!

there are a solution ?
sorry for my poor English !

thank you.
 
cool, just post the patch here, based on the tarball sources.
 
View attachment patch.zipHi Tom, these is the patch from tarball sources.

these the command to generate the patch
rm /root/dietmar/*
diff -Nau /usr/share/pve-manager/root/backup/index.htm /root/pve-manager_2010-09-20/www/root/backup/index.htm > /root/dietmar/index.htm.path
diff -Nau /usr/sbin/vzdump /root/vzdump_2010-09-20/vzdump > /root/dietmar/vzdump.patch
diff -Nau /usr/share/perl5/PVE/VZDump.pm /root/vzdump_2010-09-20/VZDump.pm > /root/dietmar/VZDump.pm.patch
diff -Nau /usr/share/perl5/PVE/VZDump/QemuServer.pm /root/qemu-server_2010-09-20/VZDump\:\:QemuServer.pm > /root/dietmar/QemuServer.pm.path
diff -Nau /usr/share/perl5/PVE/Config.pm /root/pve-manager_2010-09-20/lib/PVE/Config.pm > /root/dietmar/Config.pm.path
diff -Nau /root/it.po /root/it.po.originale > /root/dietmar/it.po.path
tar -cvpzf /root/patch.tgz /root/dietmar/*

thank you.
 
Hi,

I was just looking for a way to exclude one virtual disk from my proxmox backup when I came accross this post.
Is anyone already using this patch?

As I'm not experienced with linux patches, how can I apply this patch?
I see there are two .patch files. Do I have to apply both?

thanks for any help.

Jose
 
these is the procedure to path your sistem:

download the patch.zip and put in a directory (e.g.:/root)
cd /root
unzip patch.zip
tar -zxvf patch.tgz
cd /root/root/dietmar
patch -p1 -i vzdump.patch
at the request "File to patch:" insert /usr/sbin/vzdump
at the request "Reversed (or previously applied) patch detected! Assume -R? [n]" response "y"
make these for all FILE.patch present in the /root/root/dietmar (NOT for the it.po.patch !!)
and restart the pvedaemon /etc/init.d/pvedaemon restart

Marco
 
I post a new file .zip, I have changed some name of file included from .path to .patch

To generate the patch I compared the tarball with the source present on my Proxmox test, than I changed the source on my Proxmox and than I compared my source with the tarball.

View attachment patch.zip

sorry for my poor English !
 
Thanks for the patch. But wouldn't it be better to add a 'backup' option to the VM drive config? Something like:

Code:
ide0: local:101/vm-101-disk-1.raw,backup=no
Any other ideas?

Yes, I had thought but it seemed difficult to achieve, not knowing the source of pve.

Now I start to know the source of pve I can try to implement it.
I try to make it
 
Hi,
This would be a very clean and flexible solution.

Btw, where can I find this drive configuration file?
 
Thanks for the patch. But wouldn't it be better to add a 'backup' option to the VM drive config? Something like:

Code:
ide0: local:101/vm-101-disk-1.raw,backup=no
Any other ideas?

OK, these is the patch to intercept "backup=no" and exclude disk from backup.

View attachment QemuServer.pm.zip

let me know if the patch will be added with future versions of packages pve, thank you very much.

Dietmar: why in the web interface of pve, on hardware tab, you can not change the settings of existing hard disk ? too "dangerous" ?
for the moment I have not made changes to the web interface and the patch is intended to modify IDMACHINE.conf directly.
 
let me know if the patch will be added with future versions of packages pve, thank you very much.

yes (if the patch works)

Dietmar: why in the web interface of pve, on hardware tab, you can not change the settings of existing hard disk ? too "dangerous" ?
for the moment I have not made changes to the web interface and the patch is intended to modify IDMACHINE.conf directly.

There will be a complete new web interface in V2.0, so I would not change too much there.
 

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!