man8-editing-pass-20051213
[openafs.git] / doc / man-pages / pod8 / backup_diskrestore.pod
1 =head1 NAME
2
3 backup diskrestore - Restores the entire contents of a partition
4
5 =head1 SYNOPSIS
6
7 B<backup diskrestore> B<-server> <I<machine to restore>> 
8     B<-partition> <I<partition to restore>>
9     [B<-portoffset> <I<TC port offset>>+]  
10     [B<-newserver> <I<destination machine>>]
11     [B<-newpartition> <I<destination partition>>]
12     [B<-extension> <I<new volume name extension>>]
13     [B<-n>] [B<-localauth>] [B<-cell> <I<cell name>>] [B<-help>]
14
15 B<backup di> B<-s> <I<machine to restore>> B<-pa> <I<partition to restore>>
16     [B<-po> <I<TC port offset>>+] [B<-news> <I<destination machine>>]
17     [B<-newp> <I<destination partition>>]
18     [B<-e> <I<new volume name extension>>] [B<-n>] [B<-l>]
19     [B<-c> <I<cell name>>] [B<-h>]
20
21 =head1 DESCRIPTION
22
23 The B<backup diskrestore> command restores all of the volumes for which
24 the Volume Location Database (VLDB) lists a read/write site on the
25 partition specified with the B<-server> and B<-partition> arguments. It is
26 useful if a disk or machine failure corrupts or destroys the data on an
27 entire partition. (To restore any read-only or backup volumes that resided
28 on the partition, use the B<vos release> and B<vos backup> commands,
29 respectively, after restoring the read/write version.)
30
31 If restoring only selected volumes to a single site, it is usually more
32 efficient to use the B<backup volrestore> command. To restore multiple
33 volumes to many different sites, use the B<backup volsetrestore> command.
34
35 (If the C<FILE YES> instruction appears in the
36 F</usr/afs/backup/CFG_I<device_name>> file on the Tape Coordinator machine
37 associated with the specified port offset, then the Backup System restores
38 data from the backup data file listed for that port offset in the Tape
39 Coordinator's F</usr/afs/backup/tapeconfig> file, instead of from
40 tape. For the sake of clarity, the following text refers to tapes only,
41 but the Backup System handles backup data files in much the same way.)
42
43 The Backup System determines whether the read/write or backup version of
44 each volume was dumped more recently, and restores the dumps of that
45 version, starting with the most recent full dump. It resets the creation
46 timestamp of each restored volume to the date and time at which it begins
47 restoring the volume (the creation timestamp appears in the C<Creation>
48 field of the output from the B<vos examine> and B<vos listvol> commands).
49
50 If all of the full and incremental dumps of all relevant volumes were not
51 written on compatible tape devices, use the B<-portoffset> argument to
52 list multiple port offset numbers in the order in which the tapes are
53 needed (first list the port offset for the full dump, second the port
54 offset for the level 1 incremental dump, and so on). This implies that the
55 full dumps of all relevant volumes must have been written to a type of
56 tape that the first Tape Coordinator can read, the level 1 incremental
57 dumps to a type of tape the second Tape Coordinator can read, and so
58 on. If dumps are on multiple incompatible tape types, use the B<backup
59 volrestore> command to restore individual volumes, or the B<backup
60 volsetrestore> command after defining groups of volumes that were dumped
61 to compatible tape types. For further discussion, see the I<IBM AFS
62 Administration Guide>.
63
64 By default, the Backup System restores the contents of the specified
65 partition to that same partition. To restore the contents to an alternate
66 site, combine the following options as indicated. The Backup System
67 removes each volume from the original site, if it still exists, and
68 records the change of site in the VLDB.
69
70 =over 4
71
72 =item *
73
74 To restore to a different partition on the same file server machine,
75 provide the B<-newpartition> argument.
76
77 =item *
78
79 To restore to the partition with the same name on a different file server
80 machine, provide the B<-newserver> argument.
81
82 =item *
83
84 To restore to a completely different site, combine the B<-newserver> and
85 B<-newpartition> arguments.
86
87 =back
88
89 By default, the Backup System overwrites the contents of existing volumes
90 with the restored data. To create a new volume to house the restored data
91 instead, use the B<-extension> argument. The Backup System creates the new
92 volume at the site designated by the B<-newserver> and B<-newpartition>
93 arguments if they are used or the B<-server> and B<-partition> arguments
94 otherwise. It derives the volume name by adding the extension to the
95 read/write base name listed in the VLDB, and creates a new VLDB entry. The
96 command does not affect the existing volume in any way. However, if a
97 volume with the specified extension also already exists, the command
98 overwrites it.
99
100 To print out a list of the tapes containing the needed dumps, without
101 actually performing the restore operation, include the B<-n> flag along
102 with the other options to be used on the actual command.
103
104 The Tape Coordinator's default response to this command is to access the
105 first tape it needs by invoking the C<MOUNT> instruction in the local
106 F<CFG_I<device_name>> file, or by prompting the backup operator to insert
107 the tape if there is no C<MOUNT> instruction. However, if the C<AUTOQUERY
108 NO> instruction appears in the F<CFG_I<device_name>> file, or if the
109 issuer of the B<butc> command included the B<-noautoquery> flag, the Tape
110 Coordinator instead expects the tape to be in the device already.  If it
111 is not, or is the wrong tape, the Tape Coordinator invokes the C<MOUNT>
112 instruction or prompts the operator. It also invokes the C<MOUNT>
113 instruction or prompts for any additional tapes needed to complete the
114 restore operation; the backup operator must arrange to provide them.
115
116 =head1 CAUTIONS
117
118 If issuing this command to recover data after a disk crash or other
119 damage, be sure not to issue the B<vos syncserv> command first. Doing so
120 destroys the VLDB record of the volumes that resided on the partition.
121
122 =head1 OPTIONS
123
124 =over 4
125
126 =item B<-server> <I<machine to restore>>
127
128 Names the file server machine that the VLDB lists as the site of the
129 volumes that need to be restored.
130
131 =item B<-partition> <I<partition to restore>>
132
133 Names the partition that the VLDB lists as the site of the volumes that
134 need to be restored.
135
136 =item B<-portoffset> <I<TC port offset>>+
137
138 Specifies one or more port offset numbers (up to a maximum of 128), each
139 corresponding to a Tape Coordinator to use in the operation. If there is
140 more than one value, the Backup System uses the first one when restoring
141 the full dump of each volume, the second one when restoring the level 1
142 incremental dump of each volume, and so on. It uses the final value in the
143 list when restoring dumps at the corresponding depth in the dump hierarchy
144 and at all lower levels.
145
146 Provide this argument unless the default value of 0 (zero) is appropriate
147 for all dumps. If C<0> is just one of the values in the list, provide it
148 explicitly in the appropriate order.
149
150 =item B<-newserver> <I<destination machine>>
151
152 Names an alternate file server machine to which to restore the volumes. If
153 this argument is omitted, the volumes are restored to the file server
154 machine named by the B<-server> argument.
155
156 =item B<-newpartition> <I<destination partition>>
157
158 Names an alternate partition to which to restore the data. If this
159 argument is omitted, the volumes are restored to the partition named by
160 the B<-partition> argument.
161
162 =item B<-extension> <I<new volume name extension>>
163
164 Creates a new volume for each volume being restored, to house the restored
165 data. The Backup System derives the new volume's name by appending the
166 specified string to the read/write base name listed in the VLDB, and
167 creates a new VLDB volume entry. The Backup System preserves the contents
168 of the volumes on the partition, if any still exist. Any string other than
169 C<.readonly> or C<.backup> is acceptable, but the combination of the base
170 name and extension cannot exceed 22 characters in length. To use a period
171 to separate the extension from the name, specify it as the first character
172 of the string (as in C<.rst>, for example).
173
174 =item B<-n>
175
176 Displays a list of the tapes necessary to perform the requested restore,
177 without actually performing the operation.
178
179 =item B<-localauth>
180
181 Constructs a server ticket using a key from the local
182 F</usr/afs/etc/KeyFile> file. The B<backup> command interpreter presents
183 it to the Backup Server, Volume Server and VL Server during mutual
184 authentication. Do not combine this flag with the B<-cell> argument. For
185 more details, see L<backup(8)>.
186
187 =item B<-cell> <I<cell name>>
188
189 Names the cell in which to run the command. Do not combine this argument
190 with the B<-localauth> flag. For more details, see L<backup(8)>.
191
192 =item B<-help>
193
194 Prints the online help for this command. All other valid options are
195 ignored.
196
197 =back
198
199 =head1 OUTPUT
200
201 If a tape error occurs during the restore operation, the Tape Coordinator
202 displays the following messages:
203
204    Restore operation on volume I<name> failed due to tape error
205    Do you want to continue (y/n)?
206
207 where I<name> is the name of the volume that was being restored when the
208 tape error occurred. Enter the value B<y> to continue the operation
209 without restoring the indicated volume or the value C<n> to terminate the
210 operation. In the latter case, the operator can then attempt to determine
211 the cause of the tape error.
212
213 If the issuer includes the B<-n> flag with the command, the following
214 string appears at the head of the list of the tapes necessary to perform
215 the restore operation:
216
217    Tapes needed:
218
219 =head1 EXAMPLES
220
221 The following command restores the volumes for which the VLDB lists a
222 read/write site on the F</vicepd> partition of the machine
223 C<fs5.abc.com>. The Tape Coordinator associated with port offset 3
224 performs the operation.
225
226    % backup diskrestore -server fs5.abc.com -partition /vicepd -portoffset 3
227
228 The following command restores the volumes for which the VLDB lists a
229 read/write site on the F</vicepb> partition of the machine C<fs1.abc.com>
230 to a new site: the F</vicepa> partition on the machine C<fs3.abc.com>. The
231 Tape Coordinator associated with port offset 0 performs the
232 operation. (The command appears here on two lines only for legibility.)
233
234    % backup diskrestore  -server fs1.abc.com -partition /vicepb   \
235                          -newserver fs3.abc.com -newpartition /vicepa
236
237 The following command lists the tapes required to restore the volumes for
238 which the VLDB lists a read/write site on the F</vicepm> partition of the
239 machine C<fs4.abc.com>:
240
241    % backup diskrestore -server fs4.abc.com -partition /vicepm -n
242    Tapes needed:
243    user.sunday1.1
244    user.sunday1.2
245    user.monday1.1
246    user.tuesday1.1
247    user.wednesday1.1
248
249 =head1 PRIVILEGE REQUIRED
250
251 The issuer must be listed in the F</usr/afs/etc/UserList> file on every
252 machine where the Backup Server or Volume Location (VL) Server is running,
253 and on every file server machine that houses an affected volume. If the
254 B<-localauth> flag is included, the issuer must instead be logged on to a
255 server machine as the local superuser C<root>.
256
257 =head1 SEE ALSO
258
259 L<backup(8)>,
260 L<backup_dump(8)>,
261 L<backup_volrestore(8)>,
262 L<backup_volsetrestore(8)>,
263 L<butc(8)>,
264 L<vos_backup(1)>,
265 L<vos_examine(1)>,
266 L<vos_listvol(1)>,
267 L<vos_release(1)>
268
269 =head1 COPYRIGHT
270
271 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
272
273 This documentation is covered by the IBM Public License Version 1.0.  It was
274 converted from HTML to POD by software written by Chas Williams and Russ
275 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.