How to configure backups beyond the GUI

yatesco

Renowned Member
Sep 25, 2009
230
10
83
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};