b0c3bd97749b905fdafd23a527e6c7db55b9694d
[openafs.git] / doc / man-pages / pod1 / vos_copy.pod
1 =head1 NAME
2
3 vos_copy - Make a copy of a volume
4
5 =head1 SYNOPSIS
6
7 =for html
8 <div class="synopsis">
9
10 B<vos copy> S<<< [B<-id>] <I<volume name or ID of source>> >>>
11    S<<< [B<-fromserver>] <I<machine name for source>> >>>
12    S<<< [B<-frompartition>] <I<partition name for source>> >>>
13    S<<< [B<-toname>] <I<volume name for new copy>> >>>
14    S<<< [B<-toserver>] <I<machine name for destination>> >>>
15    S<<< [B<-topartition>] <I<partition name for destination>> >>>
16    [B<-offline>] [B<-readonly>] [B<-live>] S<<< [B<-cell> <I<cell name>>] >>>
17    [B<-noauth>] [B<-localauth>] [B<-verbose>] [B<-encrypt>] [B<-noresolve>]
18    [B<-help>]
19
20 B<vos cop> S<<< [B<-i>] <I<volume name or ID of source>> >>>
21    S<<< [B<-froms>] <I<machine name for source>> >>>
22    S<<< [B<-fromp>] <I<partition name for source>> >>>
23    S<<< [B<-ton>] <I<volume name for new copy>> >>>
24    S<<< [B<-tos>] <I<machine name for destination>> >>>
25    S<<< [B<-top>] <I<partition name for destination>> >>>
26    [B<-o>] [B<-r>] [B<-li>] S<<< [B<-c> <I<cell name>>] >>>
27    [B<-noa>] [B<-lo>] [B<-v>] [B<-e>] [B<-nor>]
28    [B<-h>]
29
30 =for html
31 </div>
32
33 =head1 DESCRIPTION
34
35 The B<vos copy> command makes a copy of a volume with a new name.  It is
36 equivalent to B<vos dump> followed by B<vos restore>, but doesn't require
37 the volume be stored locally by the client.
38
39 =head1 CAUTIONS
40
41 Currently, the maximum size of a volume is 2 terabytes (2^31 bytes).
42
43 =head1 OPTIONS
44
45 =over 4
46
47 =item [B<-id>] <I<volume name or ID>>
48
49 Specifies either the complete name or volume ID number of a read/write
50 volume.
51
52 =item [B<-fromserver>] <I<machine name for source>>
53
54 Identifies the file server machine where the source volume resides. Provide
55 the machine's IP address or its host name (either fully qualified or using
56 an unambiguous abbreviation). For details, see L<vos(1)>.
57
58 =item [B<-frompartition>] <I<partition name for source>>
59
60 Names the partition where the source volume resides. Provide the full
61 partition name (for, example, B</vicepa>) or one of the abbreviated forms
62 described in L<vos(1)>.
63
64 =item [B<-toname>] <I<volume name for new copy>>
65
66 The complete name of the new volume to create.
67
68 =item [B<-toserver>] <I<machine name for destination>>
69
70 Identifies the file server machine to which to copy the volume.  Provide
71 the machine's IP address or its host name (either fully qualified or using
72 an unambiguous abbreviation). For details, see L<vos(1)>.
73
74 =item [B<-topartition>] <I<partition name for destination>>
75
76 Names the partition to which to copy the volume. Provide the full partition
77 name (for, example, B</vicepa>) or one of the abbreviated forms described in
78 L<vos(1)>.
79
80 =item B<-offline>
81
82 Leaves the new volume flagged as off-line in the volume database.
83
84 =item B<-readonly>
85
86 Flags the new volume as read-only in the volume database.
87
88 =item B<-live>
89
90 Copies the live volume without cloning.  This is normally not necessary and
91 causes the volume to be kept locked for longer than the normal copy
92 mechanism.
93
94 =item B<-localauth>
95
96 Constructs a server ticket using a key from the local
97 F</usr/afs/etc/KeyFile> file. The B<vos> command interpreter presents it to
98 the Volume Server and Volume Location Server during mutual
99 authentication. Do not combine this flag with the B<-cell> argument or
100 B<-noauth> flag. For more details, see L<vos(1)>.
101
102 =item B<-verbose>
103
104 Produces on the standard output stream a detailed trace of the command's
105 execution. If this argument is omitted, only warnings and error messages
106 appear.
107
108 =item B<-encrypt>
109
110 Encrypts the command so that the operation's results are not transmitted
111 across the network in clear text. This option is available in OpenAFS
112 versions 1.4.11 or later and 1.5.60 or later.
113
114 =item B<-noresolve>
115
116 Shows all servers as IP addresses instead of the DNS name. This is very
117 useful when the server address is registered as 127.0.0.1 or when dealing
118 with multi-homed servers. This option is available in OpenAFS
119 versions 1.4.8 or later and 1.5.35 or later.
120
121 =item B<-help>
122
123 Prints the online help for this command. All other valid options are
124 ignored.
125
126 =back
127
128 =head1 OUTPUT
129
130 This command has no output unless C<-verbose> is specified or there is
131 an error.
132
133 =head1 EXAMPLES
134
135 The following example makes a verbose copy of the C<test> volume named
136 C<test2> in the cell C<localcell>. The volume and copy both reside on
137 C</vicepa> of C<server1>.
138
139    % vos copy test server1  a test2 server1 a -cell localcell -verbose
140    Starting transaction on source volume 536870921 ... done
141    Allocating new volume id for clone of volume 536870921 ... done
142    Allocating new volume id for copy of volume 536870921 ... done
143    Cloning source volume 536870921 ... done
144    Ending the transaction on the source volume 536870921 ... done
145    Starting transaction on the cloned volume 536870926 ... done
146    Setting flags on cloned volume 536870926 ... done
147    Getting status of cloned volume 536870926 ... done
148    Creating the destination volume 536870927 ... done
149    Setting volume flags on destination volume 536870927 ... done
150    Dumping from clone 536870926 on source to volume 536870927 on destination ... done
151    Ending transaction on cloned volume 536870926 ... done
152    Starting transaction on source volume 536870921 ... done
153    Doing the incremental dump from source to destination for volume 536870921 ...  done
154    Setting volume flags on destination volume 536870927 ... done
155    Ending transaction on destination volume 536870927 ... done
156    Ending transaction on source volume 536870921 ... done
157    Starting transaction on the cloned volume 536870926 ... done
158    Deleting the cloned volume 536870926 ... done
159    Ending transaction on cloned volume 536870926 ... done
160    Created the VLDB entry for the volume test2 536870927
161    Volume 536870921 copied from server1 /vicepa to test2 on server1 /vicepa 
162
163 =head1 PRIVILEGE REQUIRED
164
165 The issuer must be listed in the F</usr/afs/etc/UserList> file on the
166 machine specified with the B<-server> argument and on each database server
167 machine. If the B<-localauth> flag is included, the issuer must instead be
168 logged on to a server machine as the local superuser C<root>.
169
170 =head1 SEE ALSO
171
172 L<vos(1)>,
173 L<vos_clone(1)>,
174 L<vos_move(1)>
175
176 =head1 COPYRIGHT
177
178 Copyright 2007 Jason Edgecombe <jason@rampaginggeek.com>
179
180 This documentation is covered by the BSD License as written in the
181 doc/LICENSE file. This man page was written by Jason Edgecombe for
182 OpenAFS.