How to configure backups beyond the GUI

yatesco

Well-Known Member
Sep 25, 2009
211
5
58
Hi,

I want to customise the backup as follows:

- specify gzip -rsyncable to make rsyncing more efficient when backing up offsite
- specify an additional script after the whole backup file has finished

I had a hunt around in /etc/vz and /etc/pve and couldn't find anything obvious.

Help please :)
 
Depends a little on your version of vzdump and PVE.

You may have a "Compress" option when defining backups on the PVE web interface.

If you want to run a script after the backup has finished, and assuming you want to apply the settings to all vzdump backups, create /etc/vzdump.conf and add:

script: /path/to/your/script

You can look at /usr/share/doc/vzdump/examples/hook-script.pl as an example.
 
Thanks Peter.

I know about the compression, but I want to change how it does the compression (i.e. add -rsyncable when calling gzip, if it uses gzip).

I will have a look at that doc.
 
If you look at /usr/sbin/vzdump (it's a Perl script), you'll see the following lines:

Code:
# by default we set --rsyncable for gzip
$ENV{GZIP} = "--rsyncable" if !$ENV{GZIP};
 

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!