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