Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Solved - OVZ FTP automated backup not using LVM snapshot on CentOS 6
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Solved - OVZ FTP automated backup not using LVM snapshot on CentOS 6

jmginerjmginer Member, Patron Provider
edited February 2013 in General

Hi LowEndTalkers!

I'm not sure since when this problem happens. But in the past I had no problems and I was going with the latest installs using the script to install SolusVM OVZ.

I do a vzdump selecting snapshot mode, but instead I have free space on the VG, the dump takes the suspend mode.

[root@ovz1 ~]# vzdump --compress --dumpdir /vzdump/n1/ --tmpdir /vzdump/n1/ --snapshot 1552
INFO: Starting new backup job - vzdump --compress --dumpdir /vzdump/n1/ --tmpdir /vzdump/n1/ --snapshot 1552
INFO: Starting Backup of VM 1552 (openvz)
INFO: status = CTID 1552 exist mounted running
ERROR: unable to detect lvm volume group, using 'suspend' mode
INFO: starting first sync /vz/private/1552 to /vzdump/n1/vzdumptmp307082
INFO: Number of files: 32565
INFO: Number of files transferred: 24579
INFO: Total file size: 552584300 bytes
INFO: Total transferred file size: 552469426 bytes
INFO: Literal data: 552469426 bytes
INFO: Matched data: 0 bytes
INFO: File list size: 811488
INFO: File list generation time: 0.001 seconds
INFO: File list transfer time: 0.000 seconds
INFO: Total bytes sent: 554416196
INFO: Total bytes received: 493569
INFO: sent 554416196 bytes received 493569 bytes 5872061.01 bytes/sec
INFO: total size is 552584300 speedup is 1.00
INFO: first sync finished (94 seconds)
INFO: suspend vps
INFO: Setting up checkpoint...
INFO: suspend...
INFO: get context...
INFO: Checkpointing completed successfully
INFO: final sync /vz/private/1552 to /vzdump/n1/vzdumptmp307082
INFO: Number of files: 32565
INFO: Number of files transferred: 0
INFO: Total file size: 552584300 bytes
INFO: Total transferred file size: 0 bytes
INFO: Literal data: 0 bytes
INFO: Matched data: 0 bytes
INFO: File list size: 811488
INFO: File list generation time: 0.001 seconds
INFO: File list transfer time: 0.000 seconds
INFO: Total bytes sent: 814102
INFO: Total bytes received: 2613
INFO: sent 814102 bytes received 2613 bytes 39839.76 bytes/sec
INFO: total size is 552584300 speedup is 676.59
INFO: final sync finished (21 seconds)
INFO: resume vps
INFO: Resuming...
INFO: vps is online again after 26 seconds
INFO: creating archive '/vzdump/n1/vzdump-1552.dat' (/vzdump/n1/vzdumptmp307082/1552)
INFO: Total bytes written: 575641600 (549MiB, 6.6MiB/s)
INFO: file size 205MB
INFO: Finished Backup of VM 1552 (00:03:27)
[root@ovz1 ~]#

I have solved doing this:

yum remove -y vzdump;
rpm -Uvh http://pkgs.repoforge.org/cstream/cstream-2.7.4-3.el6.rf.x86_64.rpm;
wget http://pkgs.repoforge.org/perl-LockFile-Simple/perl-LockFile-Simple-0.207-1.el6.rf.noarch.rpm;
rpm -Uvh perl-LockFile-Simple-0.207-1.el6.rf.noarch.rpm;
/bin/rm perl-LockFile-Simple-0.207-1.el6.rf.noarch.rpm;
wget http://download.openvz.org/contrib/utils/vzdump/vzdump-1.2-4.noarch.rpm;
rpm -Uhv vzdump-1.2-4.noarch.rpm;
nano /usr/share/perl5/PVE/VZDump.pm

On line 622, you will find the following:
if ($line =~ m|^\s*(\S+):(\S+):(\d+(.\d+))M$|) {

Replace this with:
if ($line =~ m|^\s*(\S+):(\S+):(\d+([.,]\d+))[mM]$|) {

Save and close the file. Snapshots will now work with vzdump

[root@ovz4 ~]# vzdump --compress --dumpdir /vzdump/n1/ --tmpdir /vzdump/n1/ --snapshot 1520
INFO: starting new backup job: vzdump --compress --dumpdir /vzdump/n1/ --tmpdir /vzdump/n1/ --snapshot 1520
INFO: Starting Backup of VM 1520 (openvz)
INFO: CTID 1520 exist mounted running
INFO: status = CTID 1520 exist mounted running
INFO: backup mode: snapshot
INFO: bandwidth limit: 5120 KB/s
INFO: creating lvm snapshot of /dev/mapper/vz-vz ('/dev/vz/vzsnap-ovz4.ginernet.com-0')
INFO: Logical volume "vzsnap-ovz4.ginernet.com-0" created
INFO: creating archive '/vzdump/n1/vzdump-openvz-1520-2013_02_05-20_07_40.tgz'
INFO: Total bytes written: 858664960 (819MiB, 8.4MiB/s)
INFO: archive file size: 368MB
INFO: Logical volume "vzsnap-ovz4.ginernet.com-0" successfully removed
INFO: Finished Backup of VM 1520 (00:01:42)
INFO: Backup job finished successfuly
[root@ovz4 ~]#

I hope this information is helpful to someone.
Best regards!!

Sign In or Register to comment.