Myatu
13-09-2010, 18:09
Look at /usr/share/doc/vzdump/examples/hook-script.pl. Then in a newly created file named /etc/vzdump.conf you add:
Obviously with the actual path/filename to the script, and ensure the script has the executable flag set. The script is called by vzdump at several stages, passing the stage as an argument. For example, "backup-end" when it successfully finished creating a backup. Then the environment variables contain more details about, say, the tar-file ($ENV{TARFILE}), where the log file is, etc.
Code:
script: /file/path/to/scripts/backup_hook.pl