vzdump output to directory instead of archive

benh7

Member
Dec 17, 2019
4
0
6
50
I am currently using borg backup to compress and dedup backups which has been very successful in saving space. However to get the benefit of de-duplication I need to extract the vzdump archive before importing to borg. This adds time to an already long process.

Is there a way to backup a VM directly to directory without the need to extract the vzdump archive first?
 
No, not directly. You could do so with VZDump hooks.

https://pve.proxmox.com/pve-docs/chapter-vzdump.html#_hook_scripts
See: /usr/share/doc/pve-manager/examples/vzdump-hook-script.pl

There's already an example code-hunk for copying over a backup to a remote machine once it's finished - you could plug into there the whole extract+borg steps.

FYI: We're working onto a deduplicated backup solution.
 
Thanks Thomas. I'm looking forward to the dedup backup solution! In the meantime, it looks like the hooks will still create the archive and double the work.

Do you see any problems with freezing the file system using "qm guest cmd <vm id> fsfreeze-freeze", then making a copy of the lvm using dd, then thawing the filesystem?

I think this might stop the doubling up while I'm waiting for the dedup solution.
 
I am currently using borg backup to compress and dedup backups which has been very successful in saving space. However to get the benefit of de-duplication I need to extract the vzdump archive before importing to borg. This adds time to an already long process.

Is there a way to backup a VM directly to directory without the need to extract the vzdump archive first?

I know this thread is a couple of years old, but I just came across it looking for something else. Maybe I misunderstand the question, but I backup vzdump (wma and tar) files directly from /var/lib/vz/dump, with borg, including compression and deduplication, at about 10GB/min, but of course that depends on many factors, including cpu, disk and bandwidth to backup server.

Code:
                       Original size      Compressed size    Deduplicated size
This archive:              663.56 GB            428.69 GB             14.42 GB
All archives:               10.98 TB              7.27 TB              3.26 TB
 
Last edited: