Howto create backup storage in proxmox 2.1 ?

samontetro

Active Member
Jun 19, 2012
78
2
28
Grenoble, France
Hi,

I'm runing proxmox 2.1.1 and runing a fedora in an openVZ container. My server has 4 hard drives: 2x250Gb (sda, sdc) and 2x1Tb (sdb, sdd).
proxmox is installed on /dev/sda.
I've build a new volume group on /dev/sdb, created a 500Gb logical volume formatted with xfs. It is mounted as /var/lib/vz and my virtual appliance is located on this partition. My fedora is runing backuppc for several weeks.

Now, my aim is to use the second 1Tb disk (/dev/sdd) for backup but I'm unable to configure it as a backup storage from the web interface. All the information I've found relate to previous proxmox version and it is very difficult to use it in proxmox 2.1. May be I do not search where I should....

Thanks for your advices.

Patrick
 
you need create a partition on your disk, format it and mount it in /etc/fstab to you system.

then go the GUI - Datacenter/Storage - and add this dir, mark it for "backups".
 
you need create a partition on your disk, format it and mount it in /etc/fstab to you system.

then go the GUI - Datacenter/Storage - and add this dir, mark it for "backups".

Thanks! I've launched yesterday the backup of my virtual appliance. But it is very slow (3.5 hours) and this morning I have many error messages about files not found:

in vzdump-openvz-100-2012_08_16-17_25_55.log I have:
Aug 16 20:31:54 INFO: tar: ./var/lib/BackupPC/cpool/9/f/5/9f5010aa7fc36160438ff09272e33226: Cannot stat: Input/output error

But:
# ls -l /var/lib/vz/private/100/var/lib/BackupPC/cpool/9/f/5/9f5010aa7fc36160438ff09272e33226
-rw-r----- 10 498 498 1788 Jun 22 16:32 /var/lib/vz/private/100/var/lib/BackupPC/cpool/9/f/5/9f5010aa7fc36160438ff09272e33226

So the file exists.

The /var/lib/vz/private/100 directory is 80Gbytes and my backup partition is 900Gbytes.

Log file says:
Code:
Aug 16 17:25:55 INFO: Starting Backup of VM 100 (openvz)
Aug 16 17:25:55 INFO: CTID 100 exist mounted running
Aug 16 17:25:55 INFO: status = running
Aug 16 17:25:56 INFO: backup mode: snapshot
Aug 16 17:25:56 INFO: ionice priority: 7
Aug 16 17:25:56 INFO: creating lvm snapshot of /dev/mapper/data1vg-data1lv1 ('/dev/data1vg/vzsnap-edqnm-0')
Aug 16 17:26:01 INFO:   Logical volume "vzsnap-edqnm-0" created
Aug 16 17:26:01 INFO: creating archive '/backup/dump/vzdump-openvz-100-2012_08_16-17_25_55.tar.gz'
Aug 16 20:31:03 INFO: tar: ./var/lib/BackupPC/cpool/e/7/6/e7621efc0a6ac25cce74704d8de0507b: Read error at byte 0, while reading 1156 bytes: 
Aug 16 20:31:03 INFO: tar: ./var/lib/BackupPC/cpool/e/7/6/e766f86e2a6619a8e202ec6c866d34d3: Cannot stat: Input/output error
Aug 16 20:31:03 INFO: tar: ./var/lib/BackupPC/cpool/e/7/6/e7665fc73435226a71814f8b7bff7a81: Cannot stat: Input/output error
.....
Aug 16 20:57:50 INFO: tar: ./aquota.user: Cannot stat: Input/output error
Aug 16 20:57:50 INFO: tar: ./aquota.group: Cannot stat: Input/output error
Aug 16 20:57:50 INFO: tar: ./.autofsck: Cannot stat: Input/output error
Aug 16 20:57:50 INFO: Total bytes written: 27034695680 (26GiB, 2.4MiB/s)
Aug 16 20:57:50 INFO: tar: Exiting with failure status due to previous errors
Aug 16 20:57:50 INFO: archive file size: 24.69GB
Aug 16 20:57:52 INFO: Finished Backup of VM 100 (03:31:57)

Patrick
 
you run backuppc in a container?
 
Yes, I run BackupPC in a container. You think it's not a good configuration ?
My first idea was to have the data stored outside the virtual appliance, on a dedicated hard drive, not to backup the backup.
But I'm new to Proxmox/OpenVZ and I do not succes in building such a configuration. I've still my old BackuPC server runing, so I can break this new config based on proxmox and OpenVZ. I need to backup my virtual appliance successfuly and know how to restart it on a rescue proxmox server before switching in prod.
I'v not a lot of data to backup, The BackupPC maximum needed storage is only some hundreds of gigabytes.
 
I am not the backuppc expert but I remember there is an issue with the extensive use of symlinks. pls ask in the backuppc community if its possible to run in a OpenVZ container. Or just use KVM.
 
I am not the backuppc expert but I remember there is an issue with the extensive use of symlinks. pls ask in the backuppc community if its possible to run in a OpenVZ container. Or just use KVM.

I've setup a different configuration which is more suitable with backuPC in proxmox under OpenVZ.
Now /var/lib/vz is again on /dev/sda. It is a logical volume formatted in XFS (default is ext3 but...).
I've setup a different disk (/dev/sdd, 1Tb) to store backupPC data on the node. This partition is "bind mounted" (http://wiki.openvz.org/Bind_mounts) at boot time by my fedora virtual node runing BackupPC. In my mind, this storage could be an external disk array or, may be, a drbd device for high availability (not the case at this time).

I've just make a mistake by allowing all the remaining available space on /dev/sda for /dev/pve/data and the backup process was unable to create the snapshot!

Now, the pve volume group has 17Mb available and the backup with snapshot is very fast.

Just have to test the restaure step!

Thanks Tom for all your pertinent advices .
 
Hi all,


I´ve the same problem. Anybody can help me to solve ?
I´m using a esata only to backups. Only one container failed.

Here is the backup log

---------------------------------------------------------------------------------------------------------------------------------------------------

INFO: starting new backup job: vzdump 101 --quiet 1 --mode snapshot --storage backup_externo --node server2

INFO: Starting Backup of VM 101 (openvz)
INFO: Warning: Unknown iptable module: xt_connlimit, skipped
INFO: CTID 101 exist mounted running
INFO: status = running
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating lvm snapshot of /dev/mapper/pve-data ('/dev/pve/vzsnap-server2-0')
INFO: Logical volume "vzsnap-server2-0" created
INFO: creating archive '/backup_externo/dump/vzdump-openvz-101-2013_08_12-01_30_05.tar'
INFO: tar: ./home/ws355/mail/domain.com.br/user/new/1370367536.H754178P14549.webstudio.adm.br,S=23249572: File shrank by 10306212 bytes; padding with zeros
INFO: tar: ./home/ws355/mail/domain.com.br/user/new/1374971882.H636431P12238.webstudio.adm.br,S=3591: Read error at byte 0, while reading 2048 bytes: Input/output error
INFO: tar: ./home/ws355/mail/domain.com.br/user/new/1373434234.H786896P10354.webstudio.adm.br,S=5135: Read error at byte 0, while reading 5135 bytes: Input/output error
INFO: tar: ./home/ws355/mail/domain.com.br/user/new/1372761304.H551595P10935.webstudio.adm.br,S=15698: Read error at byte 0, while reading 9728 bytes: Input/output error
.....
INFO: tar: ./dev/ram: Cannot stat: No such file or directory
INFO: tar: ./dev/core: Cannot stat: No such file or directory
INFO: tar: ./dev/pts: Cannot stat: No such file or directory
INFO: tar: ./proc: Cannot stat: No such file or directory
INFO: Total bytes written: 49116057600 (46GiB, 4.2MiB/s)
INFO: tar: Exiting with failure status due to previous errors
ERROR: Backup of VM 101 failed - command '(cd /mnt/vzsnap0/private/101;find . '(' -regex '^\.$' ')' -o '(' -type 's' -prune ')' -o -print0|sed 's/\\/\\\\/g'|tar cpf - --totals --sparse --numeric-owner --no-recursion --one-file-system --null -T -) >/backup_externo/dump/vzdump-openvz-101-2013_08_12-01_30_05.dat' failed: exit code 2
INFO: Backup job finished with errors
postdrop: warning: uid=0: File too large
sendmail: fatal: root(0): message file too big
TASK ERROR: job errors

---------------------------------------------------------------------------------------------------------------------------------------------------

Thank you
Olavo










I've setup a different configuration which is more suitable with backuPC in proxmox under OpenVZ.
Now /var/lib/vz is again on /dev/sda. It is a logical volume formatted in XFS (default is ext3 but...).
I've setup a different disk (/dev/sdd, 1Tb) to store backupPC data on the node. This partition is "bind mounted" (http://wiki.openvz.org/Bind_mounts) at boot time by my fedora virtual node runing BackupPC. In my mind, this storage could be an external disk array or, may be, a drbd device for high availability (not the case at this time).

I've just make a mistake by allowing all the remaining available space on /dev/sda for /dev/pve/data and the backup process was unable to create the snapshot!

Now, the pve volume group has 17Mb available and the backup with snapshot is very fast.

Just have to test the restaure step!

Thanks Tom for all your pertinent advices .
 

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!