vzdump question regarding naming of backup file

Ovidiu

Renowned Member
Apr 27, 2014
326
13
83
Hi there,

I tried to backup my VMs via duply after stopping them and restarting afterwards but my upload speed is too slow to do it this way.

My next approach is to use vzdump with suspend then fire up the VM again and then run duply to backup the backup that vzdump generated.
Since duply does only upload the parts that have changed, I need to keep the backup to use the same file name but apparently vzdump can't do this. I

duply has a "pre" script that runs before the backup and I was planning to insert a command like this:

Code:
vzdump 100 -compress 0 -storage /root/vzdump

but that results in a file that contains the date.
Would this be a workaround?
Code:
vzdump 100 -compress 0 > /root/vzdump/vzdump-VM-ID-100

I've disabled compression since that would affect duply's ability to diff the file.
 
OK, so this doesn't work:
Code:
[COLOR=#333333]vzdump 100 -compress 0 > /root/vzdump/vzdump-VM-ID-100[/COLOR]
and after checking the vzdump manual I'm not really sure how to use the storage option, the manual says: storage: STORAGE_ID what storage ID?
 
OK, so this doesn't work:
Code:
[COLOR=#333333]vzdump 100 -compress 0 > /root/vzdump/vzdump-VM-ID-100[/COLOR]
and after checking the vzdump manual I'm not really sure how to use the storage option, the manual says: storage: STORAGE_ID what storage ID?

it's the (unique) name of the storage in the cluster. You can see from the web gui, datacenter > storage. It has to be compatible for backups (so no LVM), and enabled for them (selecting also "backups" in their config)

Marco
 
THX!

Is there no other way to backup a KVM with more control over i.e. where to back it up and how to name it? vzdump seems to be tied into proxmox too much for my needs :-/
 
THX!

Is there no other way to backup a KVM with more control over i.e. where to back it up and how to name it? vzdump seems to be tied into proxmox too much for my needs :-/

see its native options (http://pve.proxmox.com/wiki/Vzdump_manual)
- vzdump has -dumpdir and -script options that could allow you some tricks

apart those,
- vzdump source is available (iirc, is a perl script): you can easily ("hey, didn't you just say it's perl?" :D ) build your own vzdump custom copy, doing whatever you want

Marco
 
THX! -dumpdir helped a lot.

Can someone help me with a basic find/replace command that i.e. runs through the -dumpdir I specified and renames the dumps by removing the date?

i.e. vzdump-qemu-105-2014_07_24-18_23_31.vma and vzdump-qemu-105-2014_07_24-18_23_31.log should get renamed to vzdump-qemu-105.vma and vzdump-qemu-105.log?

My initial start was something like this but I can't get it right: find /root/vzdump -name "*.log" -print0 | xargs -0 -I file mv file