48e3cf220e7811fa75e7e791a1dfbc4fa58fdb92
[util-vserver.git] / man / vserver-copy.8
1 .TH "vserver-copy" "8" "0.3" "Mark Lawrence <nomad@null.net>" "System Administration"\r
2 .SH "NAME"\r
3 .LP \r
4 vserver-copy \- copy/move a virtual server.\r
5 .SH "SYNTAX"\r
6 .LP \r
7 vserver-copy [\fIoptions\fP] \fIvserver\fP \fInewname\fP \r
8 .LP \r
9 vserver-copy [\fIoptions\fP] \fIvserver\fP \fIhost\fP:[\fInewname\fP]\r
10 .SH "DESCRIPTION"\r
11 .LP \r
12 vserver-copy makes a copy of a virtual server using rsync. It will\r
13 rewrite the vserver.conf configuration file with the new hostname and\r
14 IP information when given. If the destination name contains a host\r
15 specification then ssh/rsh will be used for the data transfer.\r
16 \r
17 vserver-copy can used on a running vserver, although naturally the\r
18 consistency of open database files and the like cannot be guaranteed.\r
19 A running vserver can however be safely moved from one root host to another\r
20 using the \-s flag.\r
21 \r
22 If downtime is an issue when moving a virtual server across hosts you\r
23 should first run vserver without the \-s flag. This will pre\-populate the\r
24 destination filesystem requiring only updates to be made on the next\r
25 invocation.\r
26 .SH "OPTIONS"\r
27 .LP \r
28 .TP \r
29 \fB\-h\fR,\fB-\-help\fR\r
30 output usage information and exit\r
31 .TP \r
32 \fB\-V\fR,\fB-\-version\fR\r
33 output version information and exit\r
34 .TP \r
35 \fB\-v\fR,\fB-\-verbose\fR\r
36 show all output (normally only informational messages and warnings)\r
37 .TP \r
38 \fB\-q\fR,\fB-\-quiet\fR\r
39 suppress all output\r
40 .TP \r
41 \fB\-d\fR,\fB-\-domain\fR domain\r
42 the new DNS domain when changing name. Overwrites /etc/hosts. Must be\r
43 used with \-i\r
44 .TP \r
45 \fB\-i\fR,\fB-\-ip\fR address\r
46 the new IP address when changing name. Overwrites /etc/hosts. Must be\r
47 used with \-d\r
48 .TP \r
49 \fB\-r\fR,\fB-\-vsroot\fR\r
50 directory containing virtual servers. Defaults to "/vserver"\r
51 .TP \r
52 \fB\-R\fR,\fB-\-rsh\fR\r
53 use rsh instead of the default ssh for network transfer\r
54 .TP\r
55 \fB\-s\fR,\fB-\-stopstart\fR\r
56 stop the virtual server before copying and start the new vserver afterwards.\r
57 This really only makes sense if you are copying across root hosts and not\r
58 changing names or IP addresses.\r
59 .SH "FILES"\r
60 .LP \r
61 \fI/etc/vservers/vserver.conf\fP \r
62 .SH "EXAMPLES"\r
63 .LP \r
64 # Copy a template vserver (same IP addresses etc)\r
65 \r
66 /usr/sbin/vserver-copy template web01\r
67 \r
68 # Copy webserver with change in configuration\r
69 \r
70 /usr/sbin/vserver-copy -i 192.168.5.62 -d example.com template web62\r
71 \r
72 # Move a running vserver to another roothost\r
73 \r
74 /usr/sbin/vserver-copy -s web62 roothost02:\r
75 \r
76 .SH "BUGS"\r
77 .LP \r
78 If a virtual server is moved from one root host to another a gratuitious\r
79 ping should be sent to inform other devices on the local area network\r
80 of the change in MAC address.\r
81 \r
82 Without this ping the devices will continue to attempt to reach the old\r
83 MAC address for the length of their arp-cache timeout (10 minute default\r
84 on Suns!).\r
85 \r
86 This functionality should probably be implmemented during the \r
87 "vserver <name> start" process.\r
88 .SH "AUTHOR"\r
89 .LP \r
90 Mark Lawrence <nomad@null.net>\r
91 .SH "SEE ALSO"\r
92 .LP \r
93 vserver(8)\r