Langue: en

Version: 4632 (debian - 06/08/07)

Section: 8 (Commandes administrateur)


vserver-copy - copy/move a virtual server.


vserver-copy [options] vserver newname

vserver-copy [options] vserver host:[newname]


vserver-copy makes a copy of a virtual server using rsync. It will rewrite the vserver.conf configuration file with the new hostname and IP information when given. If the destination name contains a host specification then ssh/rsh will be used for the data transfer.

vserver-copy can used on a running vserver, although naturally the consistency of open database files and the like cannot be guaranteed. A running vserver can however be safely moved from one root host to another using the -s flag.

If downtime is an issue when moving a virtual server across hosts you should first run vserver without the -s flag. This will pre-populate the destination filesystem requiring only updates to be made on the next invocation.


output usage information and exit
output version information and exit
show all output (normally only informational messages and warnings)
suppress all output
-d,--domain domain
the new DNS domain when changing name. Overwrites /etc/hosts. Must be used with -i
-i,--ip address
the new IP address when changing name. Overwrites /etc/hosts. Must be used with -d
directory containing virtual servers. Defaults to "/vserver"
use rsh instead of the default ssh for network transfer
stop the virtual server before copying and start the new vserver afterwards. This really only makes sense if you are copying across root hosts and not changing names or IP addresses.




# Copy a template vserver (same IP addresses etc)

/usr/sbin/vserver-copy template web01

# Copy webserver with change in configuration

/usr/sbin/vserver-copy -i -d example.com template web62

# Move a running vserver to another roothost

/usr/sbin/vserver-copy -s web62 roothost02:


If a virtual server is moved from one root host to another a gratuitious ping should be sent to inform other devices on the local area network of the change in MAC address.

Without this ping the devices will continue to attempt to reach the old MAC address for the length of their arp-cache timeout (10 minute default on Suns!).

This functionality should probably be implmemented during the "vserver <name> start" process.


Mark Lawrence <nomad@null.net>