Clone Backup and Restore OpenVZ VE with vzdump

In order to save time and easily clone, backup and restore OpenVZ VE under CentOS4.6_x86_64, I found a tool named vzdump, it is very easy to use.

Install vzdump
#wget http://download.openvz.org/contrib/utils/vzdump/vzdump-1.0-2.noarch.rpm
#rpm -i vzdump-1.1-1.noarch.rpm
#yum install rsync
I also need
#wget http://dag.wieers.com/rpm/packages/cstream/cstream-2.7.4-3.el4.rf.x86_64.rpm
#rpm -i cstream-2.7.4-3.el4.rf.x86_64.rpm

Backup my first VE,
vzdump --compress --stop 101
it will create two file under /vz/dump folder, vzdump-101.tgz and vzdump-101.log

Restore
to do restore job, first I destroy VE 101
#vzctl stop 101
#vzctl destroy 101
then restore 101
vzdump –restore /vz/dump/vzdump-101.tgz 101

Clone
vzdump –restore /vz/dump/vzdump-101.tgz 102
clone is similar with restore but with a different veid
then do some set up job similar with create a new ve.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

Leave a Reply

You must be logged in to post a comment.