All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
vzdump snapshot mode not working
Hi,
I'm trying to use vzdump to backup a container and it is failing..
[root@ccg1 ~]# vzdump --compress --dumpdir /home/backup --snapshot 101 INFO: starting new backup job: vzdump --compress --dumpdir /home/backup --snapshot 101 INFO: Starting Backup of VM 101 (openvz) INFO: CTID 101 exist mounted running INFO: status = CTID 101 exist mounted running **INFO: mode failure - unable to detect lvm volume group** **INFO: trying 'suspend' mode instead** INFO: backup mode: suspend INFO: bandwidth limit: 10240 KB/s : :
I can't use solusvm or something similar because I just want to backup my own 5-6 vps only and not going to sell vps hosting.
Any one please help me fix this..
thanks.
Comments
Try this:
vzdump --dumpdir=/home/backup --suspend --compress 101
Is your /vz directory on an LVM partition? Try without the
--snapshot
.If you are using LVM check these things:
Fixing VZDump.pm
On line 622, you will find the following:
Replace this with:
Save and close the file.
Snapshots will now work with vzdump
http://openvz.org/Backup_of_a_running_container_with_vzdump
@ndelaespada vzdump works in stop/suspend mode, but that causes considerable downtime as the container will be around 20-30gb in size. Hence, I would like to use it in snapshot mode which does not cause any downtime.
@sman I already tried fixing vzdump.pm as given in your second method, but it does not work. As I just mentioned, without --snapshot, it does work. But, I need snapshot for taking a backup without any downtime.
Btw, I don't know much about lvm partitions. I can see /vz folder in / but don't know if it is on lvm. If I need to put /vz on an lvm partition, how to do it? And, I have enough disk space available for backups.. Here is df -h..
Please help.
which version of vzdump are using? The version available as rpm package has this problem with lvm. Just download the version available in a more recent tarball...
@prometeus I dont know how to see vzdump version. I checked the manual page but there is no version option. I used the tutor at http://www.zedt.eu/tech/linux/install-vzdump-using-yum-on-centos/ to install vzdump.
Download this
http://download2.proxmox.com/sources/vzdump_2011-09-13.tar.gz
you need also cpio and perl-LockFile-Simple (usually into the epel repository)
@prometeus I have downloaded http://download2.proxmox.com/sources/vzdump_2011-09-13.tar.gz
perl-LockFile-Simple seems to be already on the system. Is there any tutor on how to use this?
thanks.
remove the rpm package then
then create a config /etc/vzdump.conf
where size is the size of the snapshot partition (you need this space to be available in your volume group).
sorry for incorrect formatting..
Did you by any chance press control-c before it finished?
Here it is..
I tried vzdump..
Same result..
@rds100 Yes.. I did press Ctrl+C as the backup is using suspend mode again..
look like you're using the old perl module or there is some issue with your lvm setup....
It seems it is not possible to use snapshot vzdump backups inside a kvm vps.
Any one did tried this earlier and succeeded?
do you have lvm?
I only have the default configuration as given my kvm vps provider.
I did try to display lvms, but it says "No lvm groups found". Therefore, I thought Its not possible to have snapshot backup inside kvm vps. Am I wrong?
@zen Is it possible to create lvm inside my kvm vps? If yes, how?
I did go thru numerous googled articles on the subject and could not find any thing useful.
@zen could you please share one tutor for this? thx
@zen The problem is, most of the articles suggest to use lvm before installing the os and then resize according to the need.
Since I get my kvm vps pre installed with os, Is there any way to do what they are suggesting?
You can run
vzdump --suspend
. Only downtime is after the first rsync pass where it shuts down the container briefly and does a second rsync pass to catch changes that occurred during the first pass. I've used it quite a bit. Never had any problems.It's only a matter of seconds when using suspend, of course, the bigger the VPS is (in size) the longer it takes but in my experience a 25gb vps can take about 60-75 secs suspended while a 1-2GB vps only takes about 2 seconds suspended.
If it is just a matter of seconds, I'll use the suspend mode.
Thanks everyone for all the help.
on my 80GB large VM, this suspension/downtime and second rsync took almost 13 minutes, how can i have LVM? i have two hdds in softare raid:
Filesystem Size Used Avail Use% Mounted on
/dev/md2 2.0T 150G 1.8T 8% /
tmpfs 7.7G 0 7.7G 0% /dev/shm
/dev/md1 496M 30M 441M 7% /boot