vserver-copy

Langue: en

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

Section: 8 (Commandes administrateur)

NAME

vserver-copy - copy/move a virtual server.

SYNTAX

vserver-copy [options] vserver newname

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

DESCRIPTION

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.

OPTIONS

-h,--help
output usage information and exit
-V,--version
output version information and exit
-v,--verbose
show all output (normally only informational messages and warnings)
-q,--quiet
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
-r,--vsroot
directory containing virtual servers. Defaults to "/vserver"
-R,--rsh
use rsh instead of the default ssh for network transfer
-s,--stopstart
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.

FILES

/etc/vservers/vserver.conf

EXAMPLES

# 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 192.168.5.62 -d example.com template web62

# Move a running vserver to another roothost

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

BUGS

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.

AUTHOR

Mark Lawrence <nomad@null.net>

SEE ALSO

vserver(8)