UnixServerAdmin

Server Administration & Management

How to clone or copy a VPS in Virtuozzo

Virtouzzo provides a shell utility named ‘vzmlocal‘ , it can be used to clone a vps and comes handy in many situations. There are multiple reasons for which you may want to clone a vps, like :

* clone a vps before doing any major installation or changes within vps, so it can be reverted back in case something goes wrong
* clone a vps or vps template to create a new vps with same OS and applications, e.g. a clone for cPanel vps template to create a new cPanel vps
* to create a exact replica of a vps to be used as redundant copy of the vps

Lets see how we can use this command to create a vps clone :

# vzmlocal -C SOURCEVIED:TARGETVEID

above is general syntax , a real time example would be :

#vzmlocal -C 145:245
Moving/copying Container#145 -> Container#245, [], [] …
Syncing private area ‘/vz/private/145′->’/vz/private/245’

Successfully completed

The above command will create the exact replica of VPS with id 145 into a new VPS who’s id will be 245

Additional parameters can be used as per requirement , some of the command parameters are below :

 -s, –fast-sid : allows to speed up cloning process

-d, –destroy-source : destroys the source container after making a clone

-l, –skiplock : allows to clone the locked containers

Advertisements

October 22, 2011 - Posted by | Virtualization, Virtuozzo | , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: