DEVEL15-windows-smb-dead-vc-gc-20080627
[openafs.git] / doc / html / AdminReference / auarf091.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
2 <HTML><HEAD>
3 <TITLE>Administration Reference</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3672/auarf000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 3 Oct 2000 at 16:18:30                -->
7 <META HTTP-EQUIV="updated" CONTENT="Tue, 03 Oct 2000 16:18:29">
8 <META HTTP-EQUIV="review" CONTENT="Wed, 03 Oct 2001 16:18:29">
9 <META HTTP-EQUIV="expires" CONTENT="Thu, 03 Oct 2002 16:18:29">
10 </HEAD><BODY>
11 <!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
12 <BODY bgcolor="ffffff"> 
13 <!-- End Header Records  ============================================ -->
14 <A NAME="Top_Of_Page"></A>
15 <H1>Administration Reference</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf090.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auarf092.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <P>
18 <H2><A NAME="HDRBK_VOLRESTORE" HREF="auarf002.htm#ToC_105">backup volrestore</A></H2>
19 <A NAME="IDX4422"></A>
20 <A NAME="IDX4423"></A>
21 <A NAME="IDX4424"></A>
22 <A NAME="IDX4425"></A>
23 <A NAME="IDX4426"></A>
24 <A NAME="IDX4427"></A>
25 <P><STRONG>Purpose</STRONG>
26 <P>Restores one or more volumes
27 <P><STRONG>Synopsis</STRONG>
28 <PRE><B>backup volrestore -server</B> &lt;<VAR>destination&nbsp;machine</VAR>>
29                   <B>-partition</B> &lt;<VAR>destination&nbsp;partition</VAR>>
30                   <B>-volume</B> &lt;<VAR>volume(s)&nbsp;to&nbsp;restore</VAR>><SUP>+</SUP>  
31                   [<B>-extension</B> &lt;<VAR>new&nbsp;volume&nbsp;name&nbsp;extension</VAR>>]
32                   [<B>-date</B> &lt;<VAR>date&nbsp;from&nbsp;which&nbsp;to&nbsp;restore</VAR>><SUP>+</SUP>]
33                   [<B>-portoffset</B> &lt;<VAR>TC&nbsp;port&nbsp;offsets</VAR>><SUP>+</SUP>]  [<B>-n</B>]
34                   [<B>-localauth</B>]  [<B>-cell</B> &lt;<VAR>cell&nbsp;name</VAR>>]  [<B>-help</B>]
35    
36 <B>backup volr -s</B> &lt;<VAR>destination&nbsp;machine</VAR>>  <B>-pa</B> &lt;<VAR>destination&nbsp;partition</VAR>>
37             <B>-v</B> &lt;<VAR>volume(s)&nbsp;to&nbsp;restore</VAR>><SUP>+</SUP>  [<B>-e</B> &lt;<VAR>new&nbsp;volume&nbsp;name&nbsp;extension</VAR>>]
38             [<B>-d</B> &lt;<VAR>date&nbsp;from&nbsp;which&nbsp;to&nbsp;restore</VAR>><SUP>+</SUP>]  [-<B>po</B> &lt;<VAR>TC&nbsp;port&nbsp;offsets</VAR>><SUP>+</SUP>]
39             [<B>-n</B>]  [<B>-l</B>]  [<B>-c</B> &lt;<VAR>cell&nbsp;name</VAR>>]  [<B>-h</B>]
40 </PRE>
41 <P><STRONG>Description</STRONG>
42 <P>The <B>backup volrestore</B> command restores the contents of one or
43 more volumes to the site indicated by the <B>-server</B> and
44 <B>-partition</B> arguments. Use the command either to overwrite
45 the contents of existing volumes with the restored data or to create new
46 volumes while retaining the existing ones. The specified site does not
47 have to be the current site for the volumes.
48 <P>(If the <B>FILE YES</B> instruction appears in the
49 <B>/usr/afs/backup/CFG_</B><VAR>device_name</VAR> file associated with the
50 specified port offset, then the <B>backup volrestore</B> command restores
51 data from the backup data file listed for that port offset in the Tape
52 Coordinator's <B>/usr/afs/backup/tapeconfig</B> file, rather than
53 from tape. For the sake of clarity, the following text refers to tapes
54 only, but the Backup System handles backup data files in much the same
55 way.)
56 <P>The command's arguments can be combined as indicated:
57 <UL>
58 <P><LI>To preserve a volume's current contents and also create a new volume
59 to house the restored version, use the <B>-extension</B> argument.
60 The Backup System creates the new volume on the server and partition named by
61 the <B>-server</B> and <B>-partition</B> arguments, assigns it the
62 same name as the current volume with the addition of the specified extension,
63 and creates a new Volume Location Database (VLDB) entry for it.
64 Creating a new volume enables the administrator to compare the two
65 versions.
66 <P><LI>To overwrite a volume's existing contents with the restored version,
67 omit the <B>-extension</B> argument, and specify the site as
68 indicated: 
69 <UL>
70 <P><LI>To retain the current site, specify it with the <B>-server</B> and
71 <B>-partition</B> arguments.
72 <P><LI>To move the volume to a different site while overwriting it, specify the
73 new site with the <B>-server</B> argument, <B>-partition</B> argument,
74 or both. The Backup System creates a new volume at that site, removes
75 the existing volume, and updates the site information in the volume's
76 VLDB entry. The backup version of the volume is not removed
77 automatically from the original site, if it exists. Use the <B>vos
78 remove</B> command to remove it and the <B>vos backup</B> command to
79 create a backup version at the new site.
80 </UL>
81 <P><LI>To restore a volume that no longer exists in the file system, specify its
82 name with the <B>-volume</B> argument and use the <B>-server</B> and
83 <B>-partition</B> arguments to place it at the desired site. The
84 Backup System creates a new volume and new VLDB entry.
85 </UL>
86 <P>In each case, the command sets each volume's creation date to the date
87 and time at which it restores it. The creation date appears in the
88 <TT>Creation</TT> field in the output from the <B>vos examine</B> and
89 <B>vos listvol</B> commands.
90 <P>If restoring all of the volumes that resided on a single partition, it is
91 usually more efficient to use the <B>backup diskrestore</B>
92 command. If restoring multiple volumes to many different sites, it can
93 be more efficient to use the <B>backup volsetrestore</B> command.
94 <P>By default, the <B>backup volrestore</B> command restores the most
95 recent full dump and all subsequent incremental dumps for each volume,
96 bringing the restored volumes to the most current possible state. To
97 restore the volumes to their state at some time in the past, use the
98 <B>-date</B> argument. The Backup System restores the most recent
99 full dump and each subsequent incremental dump for which the <VAR>clone
100 date</VAR> of the volume included in the dump is before the indicated date and
101 time (the clone date timestamp appears in the <TT>clone date</TT> field of
102 the output from the <B>backup volinfo</B> command). For backup and
103 read-only volumes, the clone date represents the time at which the volume was
104 copied from its read/write source; for read/write volumes, it represents
105 the time at which the volume was locked for inclusion in the dump. The
106 resemblance of a restored volume to its actual state at the indicated time
107 depends on the amount of time that elapsed between the volume's clone
108 date in the last eligible dump and the specified time.
109 <P>If the <B>-volume</B> argument specifies the base (read/write) form of
110 the volume name, the Backup System searches the Backup Database for the newest
111 dump set that includes a dump of either the read/write or the backup version
112 of the volume. It restores the dumps of that version of the volume,
113 starting with the most recent full dump. If, in contrast, the volume
114 name explicitly includes the <B>.backup</B> or
115 <B>.readonly</B> extension, the Backup System restores dumps of the
116 corresponding volume version only.
117 <P>To generate a list of the tapes the Backup System needs to perform the
118 restore operation, without actually performing it, combine the <B>-n</B>
119 flag with the options to be used on the actual command.
120 <P>If all of the full and incremental dumps of all relevant volumes were not
121 written to a type of tape that a single Tape Coordinator can read, use the
122 <B>-portoffset</B> argument to list multiple port offset numbers in the
123 order in which the tapes are needed (first list the port offset for the full
124 dump, second the port offset for the level 1 incremental dump, and so
125 on). If restoring multiple volumes, the same ordered list of port
126 offsets must apply to all of them. If not, either issue this command
127 separately for each volume, or use the <B>vos volsetrestore</B> command
128 after defining groups of volumes that were dumped to compatible tape
129 types. For further discussion, see the <I>IBM AFS Administration
130 Guide</I>.
131 <P>The Tape Coordinator's default response to this command is to access
132 the first tape it needs by invoking the <B>MOUNT</B> instruction in the
133 local <B>/usr/afs/backup/CFG_</B><VAR>device_name</VAR> file, or by
134 prompting the backup operator to insert the tape if there is no
135 <B>MOUNT</B> instruction. However, if the <B>AUTOQUERY NO</B>
136 instruction appears in the <B>CFG_</B><VAR>device_name</VAR> file, or if the
137 issuer of the <B>butc</B> command included the <B>-noautoquery</B>
138 flag, the Tape Coordinator instead expects the tape to be in the device
139 already. If it is not, or is the wrong tape, the Tape Coordinator
140 invokes the <B>MOUNT</B> instruction or prompts the operator. It
141 also invokes the <B>MOUNT</B> instruction or prompts for any additional
142 tapes needed to complete the restore operation; the backup operator must
143 arrange to provide them.
144 <P><STRONG>Options</STRONG>
145 <DL>
146 <P><DT><B>-server
147 </B><DD>Names the file server machine on which to restore each volume. If
148 this argument and the <B>-partition</B> argument indicate a site other
149 than the current site for each volume, and the <B>-extension</B> argument
150 is not also provided, the Backup System removes the existing volumes from
151 their current sites, places the restored contents at the specified site, and
152 changes the site information in the volume's VLDB entry.
153 <P><DT><B>-partition
154 </B><DD>Names the partition to which to restore each volume. If this
155 argument and the <B>-server</B> argument indicate a site other than the
156 current site for each volume, and the <B>-extension</B> argument is not
157 also provided, the Backup System removes the existing volumes from their
158 current sites, places the restored contents at the specified site, and changes
159 the site information in the volume's VLDB entry.
160 <P><DT><B>-volume
161 </B><DD>Names one or more volumes to restore, using the volume name as listed in
162 the Backup Database. Provide the base (read/write) name of each volume
163 to have the Backup System search the Backup Database for the newest dump set
164 that includes a dump of either the read/write or the backup version of the
165 volume; it restores the dumps of that version of the volume, starting
166 with the most recent full dump. If, in contrast, a volume name
167 explicitly includes the <B>.backup</B> or
168 <B>.readonly</B> extension, the Backup System restores dumps of the
169 corresponding volume version only.
170 <P><DT><B>-extension
171 </B><DD>Creates a new volume to house the restored data, with a name derived by
172 appending the specified string to each volume named by the <B>-volume</B>
173 argument. The Backup System creates a new VLDB entry for the
174 volume. Any string other than <B>.readonly</B> or
175 <B>.backup</B> is acceptable, but the combination of the existing
176 volume name and extension cannot exceed 22 characters in length. To use
177 a period to separate the extension from the name, specify it as the first
178 character of the string (as in <B>.rst</B>, for example).
179 <P><DT><B>-date
180 </B><DD>Specifies a date and optionally time; the restored volume includes
181 data from dumps performed before the date only. Provide a value in the
182 format <VAR>mm</VAR>/<VAR>dd</VAR>/<VAR>yyyy</VAR> [<VAR>hh</VAR>:<VAR>MM</VAR>],
183 where the required <VAR>mm/dd/yyyy</VAR> portion indicates the month
184 (<VAR>mm</VAR>), day (<VAR>dd</VAR>), and year (<VAR>yyyy</VAR>), and the optional
185 <VAR>hh:MM</VAR> portion indicates the hour and minutes in 24-hour format
186 (for example, the value <B>14:36</B> represents 2:36
187 p.m.). If omitted, the time defaults to 59 seconds after
188 midnight (00:00:59 hours).
189 <P>Valid values for the year range from <B>1970</B> to
190 <B>2037</B>; higher values are not valid because the latest possible
191 date in the standard UNIX representation is in February 2038. The
192 command interpreter automatically reduces any later date to the maximum
193 value.
194 <P>If this argument is omitted, the Backup System restores all possible dumps
195 including the most recently created.
196 <TABLE><TR><TD ALIGN="LEFT" VALIGN="TOP"><B>Note:</B></TD><TD ALIGN="LEFT" VALIGN="TOP">A plus sign follows this argument in the command's syntax statement
197 because it accepts a multiword value which does not need to be enclosed in
198 double quotes or other delimiters, not because it accepts multiple
199 dates. Provide only one date (and optionally, time) definition.
200 </TD></TR></TABLE>
201 <P><DT><B>-portoffset
202 </B><DD>Specifies one or more port offset numbers (up to a maximum of 128), each
203 corresponding to a Tape Coordinator to use in the operation. If there
204 is more than one value, the Backup System uses the first one when restoring
205 the full dump of each volume, the second one when restoring the level 1
206 incremental dump of each volume, and so on. It uses the final value in
207 the list when restoring dumps at the corresponding depth in the dump hierarchy
208 and all dumps at lower levels.
209 <P>Provide this argument unless the default value of 0 (zero) is appropriate
210 for all dumps. If <B>0</B> is just one of the values in the list,
211 provide it explicitly in the appropriate order.
212 <P><DT><B>-n
213 </B><DD>Displays the list of tapes that contain the dumps required by the restore
214 operation, without actually performing the operation.
215 <P><DT><B>-localauth
216 </B><DD>Constructs a server ticket using a key from the local
217 <B>/usr/afs/etc/KeyFile</B> file. The <B>backup</B> command
218 interpreter presents it to the Backup Server, Volume Server and VL Server
219 during mutual authentication. Do not combine this flag with the
220 <B>-cell</B> argument. For more details, see the introductory
221 <B>backup</B> reference page.
222 <P><DT><B>-cell
223 </B><DD>Names the cell in which to run the command. Do not combine this
224 argument with the <B>-localauth</B> flag. For more details, see the
225 introductory <B>backup</B> reference page.
226 <P><DT><B>-help
227 </B><DD>Prints the online help for this command. All other valid options
228 are ignored.
229 </DL>
230 <P><STRONG>Output</STRONG>
231 <P>If the issuer includes the <B>-n</B> flag with the command, the
232 following string appears at the head of the list of the tapes necessary to
233 complete the restore operation.
234 <PRE>   Tapes needed:
235    
236 </PRE>
237 <P><STRONG>Examples</STRONG>
238 <P>The following command restores the volume <B>user.pat</B> to
239 partition <B>/vicepa</B> on machine
240 <B>fs5.abc.com</B>:
241 <PRE>   % <B>backup volrestore -server fs5.abc.com -partition a -volume user.pat</B>
242    
243 </PRE>
244 <P>The following command restores the volumes <B>user.smith</B> and
245 <B>user.terry</B> to partition <B>/vicepb</B> on machine
246 <B>fs4.abc.com</B>, adding a <B>.rst</B>
247 extension to each volume name and preserving the existing
248 <B>user.smith</B> and <B>user.terry</B> volumes.
249 Only dumps created before 5:00 p.m. on 31 January 1998 are
250 restored. (The command is shown here on multiple lines only for
251 legibility reasons.)
252 <PRE>   % <B>backup volrestore -server fs4.abc.com -partition b</B>  \
253                        <B>-volume user.smith user.terry</B>  \ 
254                        <B>-extension .rst -date 1/31/1998 17:00</B>
255    
256 </PRE>
257 <P>The following command restores the volume <B>user.pat</B> to
258 partition <B>/vicepb</B> on machine
259 <B>fs4.abc.com</B>. The Tape Coordinator with port
260 offset 1 handles the tape containing the full dump; the Tape Coordinator
261 with port offset 0 handles all tapes containing incremental dumps. (The
262 command is shown here on two lines only for legibility reasons.)
263 <PRE>   % <B>backup volrestore -server fs5.abc.com -partition a</B>  \
264                        <B>-volume user.pat -portoffset 1 0</B>
265    
266 </PRE>
267 <P><STRONG>Privilege Required</STRONG>
268 <P>The issuer must be listed in the <B>/usr/afs/etc/UserList</B> file on
269 every machine where the Backup Server or Volume Location (VL) Server is
270 running, and on every file server machine that houses an affected
271 volume. If the <B>-localauth</B> flag is included, the issuer must
272 instead be logged on to a server machine as the local superuser
273 <B>root</B>.
274 <P><STRONG>Related Information</STRONG>
275 <P><A HREF="auarf060.htm#HDRBK_INTRO">backup</A>
276 <P><A HREF="auarf073.htm#HDRBK_DUMP">backup dump</A>
277 <P><A HREF="auarf072.htm#HDRBK_DISKRESTORE">backup diskrestore</A>
278 <P><A HREF="auarf092.htm#HDRBK_VOLSETRESTORE">backup volsetrestore</A>
279 <P><A HREF="auarf126.htm#HDRBUTC">butc</A>
280 <P><A HREF="auarf255.htm#HDRVOS_BACKUP">vos backup</A>
281 <P><A HREF="auarf271.htm#HDRVOS_REMOVE">vos remove</A>
282 <P>
283 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf090.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auarf092.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
284 <!-- Begin Footer Records  ========================================== -->
285 <P><HR><B> 
286 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
287 </B> 
288 <!-- End Footer Records  ============================================ -->
289 <A NAME="Bot_Of_Page"></A>
290 </BODY></HTML>