View Full Version : Backup to many servers by ProxmoxVE

07-02-2010, 03:00 PM
Hi all!

I have two servers.

The first server is: Proxmox-VE. I have more VMs.

The second server is: Backup server. It powered by FreeNAS. It has a large hdd.

The second server is remotly. It lives in a remote server room.

I need to create backup dublicated.

For example:

Step 1:
I want to create a fast backup by backup my VMs to LOCAL hdd mounted to /mnt/backup

Step 2:
I want to copy a backup file from LOCAL hdd /mnt/backup to second server, AFTER step 1 (i.e. by scp or rscp or nfs). And delete old backup on second server.

What do I need for this?

RTFM says me about the file: /etc/cron.d/vzdump

# Atomatically generated file - do not edit


00 02 * * 1,2,3,4,5 root vzdump --quiet --snapshot --storage BACKUP 106
40 02 * * 7 root vzdump --quiet --snapshot --storage BACKUP 101
00 03 * * 1,3,5 root vzdump --quiet --snapshot --storage BACKUP 103
and so on

I can edit this file by hand like this:

# 106
00 02 * * 1,2,3,4,5 root /patch/to/my/custom/script

And create script file like this:

vzdump --quiet --snapshot --storage BACKUP 106
if ....
then ... backup to remote server ....
exit 0

I think it is an bad idea and a bad design.

What are you think about my problem?

07-02-2010, 03:26 PM
You can use a hook script for that. See


07-02-2010, 03:47 PM
You can use a hook script for that. See


Thank a lot for you.

I read man pages of vzdump:

You can specify a hook script with option "--script". This script is called at various phases
of the backup process, with parameters accordingly set. You can find an example in the
documentation directory ("hook-script.pl").

For use this featches i need to edit:

like this:

00 02 * * 1,2,3,4,5 root vzdump --quiet --snapshot --storage BACKUP 106 --script /patch/to/script.pl

Will it a good solution?

07-05-2010, 08:47 AM
I would create a vzdump configuration file instead (/etc/vzdump.conf)