How to configure backup directory?

nick

Renowned Member
Mar 28, 2007
364
1
83
Hi all,

I make some new tests after the final version of PVE 1.4 was released and I test the backup function..
Now, on my configuration I have 3 PVE servers (1 master and 2 slaves). On master I have mounted (on folder "/backup") an extra Hard Disk where to put all backup's from cluster.

I start the new configuration by creating the directory for each machine using WebUI on master. So, in my exemple I create a backup folder for a machine that run in SLAVE 1.
From WebUI (that run on MASTER) when I create the Directory defined as VZDUMP I specify location /backup/SLAVE1/PMAILWG

Code:
 vzdump --quiet --node 2 --snapshot --compress --storage PROXMOXMG --mailto XXXXXXXXXX@XXXXX.COM --mailto XXXXXXXX@XXXXX.com 102 

102: Oct 22 05:00:02 INFO: Starting Backup of VM 102 (openvz)

102: Oct 22 05:00:02 INFO: CTID 102 exist mounted running

102: Oct 22 05:00:02 INFO: status = CTID 102 exist mounted running

102: Oct 22 05:00:02 INFO: backup mode: snapshot

102: Oct 22 05:00:02 INFO: bandwidth limit: 10240 KB/s

102: Oct 22 05:00:02 INFO: creating lvm snapshot of /dev/mapper/pve-data ('/dev/pve/vzsnap-pve_slave_1-0')

102: Oct 22 05:00:03 INFO:   Logical volume "vzsnap-pve_slave_1-0" created

102: Oct 22 05:00:03 INFO: creating archive '/backup/SLAVE1/PMAILGW/vzdump-openvz-102-2009_10_22-05_00_02.tgz'

102: Oct 22 05:02:44 INFO: Total bytes written: 934123520 (891MiB, 6.1MiB/s)

102: Oct 22 05:02:44 INFO: archive file size: 269MB

102: Oct 22 05:02:45 INFO:   Logical volume "vzsnap-pve_slave_1-0" successfully removed

102: Oct 22 05:02:45 INFO: Finished Backup of VM 102 (00:02:43)
Now, regarding to what I defined on WebUI, the backup will be found on master, in folder /backup/SLAVE1/PMAILGW/; but, the backup was stored on SLAVE1. - see attached picture for details.

What is the corect procedure? If we create a directory to backup a machine on a SLAVE, the backup results it's stored on SLAVE, or is a bug?

It's importand to know that....because someone create the same config and will expect to store backups on extra disk's or special backup devices
 

Attachments

  • backup2.jpg
    backup2.jpg
    101.1 KB · Views: 46
Last edited:
For me it's OK! This is what I want! I use rsync script to move backup's from SLAVE to MASTER...but I want to know if this is the correct result.
 
That's mean I need to edit /etc/cron.d/vzdump. Here said:

# Atomatically generated file - do not edit :D

I can run .sh scripts too?

-----------------------
New add:
-----------------------
I run the vzdump command on SLAVE1:

Code:
vzdump --quiet --node 2 --snapshot --compress --storage PROXMOXMG --mailto XXXXXXXXXXXX@XXXXXX --mailto XXXXXXXXXX@XXXXX 102 --script /rsync/rsync.sh


and al processes was OK. He create the backup on SLAVE 1 and, regarding to rsync.sh he copy the backup to master.

Now, if I modify the value from /etc/cron.d/vzdump and for this line I put the option --script, where I need to put the script: on slave or on master? Regarding to command on Slave...but I'm not sure!
 
Last edited:
That's mean I need to edit /etc/cron.d/vzdump. Here said:

# Atomatically generated file - do not edit :D

Do not edit that file. Instead use /etc/vzdump.conf - but you need to edit that on all cluster nodes because it is not synchronized.

Or do you want the script only for specific jobs?

I can run .sh scripts too?

sure
 
Do not edit that file. Instead use /etc/vzdump.conf - but you need to edit that on all cluster nodes because it is not synchronized.

Or do you want the script only for specific jobs?

Yes, I want to use it to transfer the backup results from local to master (where is mounted the extra disk for backups). The script is made and it's working well...


yes, I just tested...you need more details about results?
 
Yes, I want to use it to transfer the backup results from local to master (where is mounted the extra disk for backups). The script is made and it's working well...

That should work when you use /etc/vzdump.conf - whats the problem?

yes, I just tested...you need more details about results?

Any problems?
 
Please, give me more details...and example...something! I realy don't know what to put inside this config file.

The format is described in the manual page:

# man vzdump

You just want to specify the script, so the file should look like:

Code:
script: /path/to/your/script

hope that helps?
 
But, If I want to run diferent scripts for each job? Hot I specify what script tu use?
 
But, If I want to run diferent scripts for each job? Hot I specify what script tu use?

Oh, you really want different scripts for different jobs on the same host?

If so, /etc/cron.d/vzdump is the right place. Unfortunately, the web interface overwrites this - but i will fix this today.
 
I want to use different backup jobs because I store backups in diferent folders...I want to keep them also with name of the machine.

In this moment I define cron jobs to run this scripts in diferent day...diferents hours.

I'll try to find a way to unify this scripts in only one.

I think a best way is to add option in WebUI where to specify the path to the script...and extra option! ;)
 

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!