1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
5 <!-- entities files to use -->
6 <!ENTITY % global_entities SYSTEM 'global.entities'>
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amrecover.8'>
13 <!-- P1 listing suppressed (not used) -->
15 <refentrytitle>amrecover</refentrytitle>
16 <manvolnum>8</manvolnum>
22 <refname>amrecover</refname>
23 <refpurpose>Amanda index database browser</refpurpose>
29 <!-- body begins here -->
32 <command>amrecover</command>
33 <arg choice='opt'>-s <replaceable>index-server</replaceable></arg>
34 <arg choice='opt'>-t <replaceable>tape-server</replaceable></arg>
35 <arg choice='opt'>-d <replaceable>tape-device</replaceable></arg>
36 <arg choice='opt'>-h <replaceable>hostname</replaceable></arg>
37 &configoverride.synopsis;
38 <arg choice='opt'>-C <replaceable>config</replaceable></arg>
43 <refsect1><title>DESCRIPTION</title>
44 <para><emphasis remap='B'>Amrecover</emphasis>
45 browses the database of Amanda index files to determine which tapes
46 contain files to recover. Furthermore, it is able to recover files.</para>
48 <para>In order to restore files in place, you must invoke
49 <command>amrecover</command>
50 from the root of the backed up filesystem, or use
51 <emphasis remap='B'>lcd</emphasis>
52 to move into that directory, otherwise a directory tree that resembles
53 the backed up filesystem will be created in the current directory.
54 See the examples below for details.</para>
56 <para>Amrecover will read the <emphasis remap='B'>amanda-client.conf</emphasis> file and the <replaceable>config</replaceable><emphasis remap='B'>/amanda-client.conf</emphasis> file. If no configuration name is supplied on the command line, Amrecover will try the compiled-in default configuration ,usually <emphasis remap='B'>DailySet1</emphasis>.</para>
59 <manref name="amanda" vol="8"/>
60 man page for more details about Amanda.</para>
63 <refsect1><title>OPTIONS</title>
64 <note><para>The Default values are those set at compile-time.
65 Use <command>amrestore</command> to recover client-encrypted or
66 client-custom-compressed tapes.</para>
68 <variablelist remap='TP'>
70 <term><emphasis remap='B'>[ -C ] config</emphasis></term>
72 <para>Amanda configuration.</para>
76 <term><option>-s index-server</option></term>
78 <para>Host that runs the index daemon.</para>
82 <term><option>-t tape-server</option></term>
84 <para>Host that runs the tape server daemon.</para>
88 <term><option>-d tape-device</option></term>
90 <para>Tape device to use on the tape server host.</para>
94 <term><option>-h hostname</option></term>
96 <para>Hostname to begin restoring; defaults to the system's hostname.</para>
101 <term><emphasis remap='B'>-o</emphasis> <replaceable>clientconfigoption</replaceable></term>
103 <para>See the "<emphasis remap='B'>CONFIGURATION OVERRIDE</emphasis>"
104 section in <manref name="amanda" vol="8"/>.</para>
111 <refsect1><title>AUTH</title>
112 <para>The default <emphasis remap='B'>auth</emphasis> is 'BSDTCP', you can set
113 a different auth in the <emphasis remap='B'>amanda-client.conf</emphasis> file
114 or by specifying the '-oauth=bsd' command line argument.</para>
117 <refsect1><title>COMMANDS</title>
118 <para><emphasis remap='B'>Amrecover</emphasis>
119 connects to the index server and then presents a command line prompt.
120 Usage is similar to an ftp client.
121 The GNU readline library is used to provide command line history and editing
122 if it was built in to
123 <command>amrecover</command>.</para>
125 <para>The purpose of browsing the database is to build up a
126 <emphasis remap='I'>restore list</emphasis>
127 of files to be extracted from the backup system.
128 The following commands are available:</para>
129 <variablelist remap='TP'>
131 <term><emphasis remap='B'>sethost hostname</emphasis></term>
133 <para>Specifies which host to look at backup files for (default: the local host).</para>
137 <term><emphasis remap='B'>setdate YYYY-MM-DD-HH-MM[-SS] | YYYY-MM-DD</emphasis></term>
139 <para>Set the restore time (default: now).
140 File listing commands only return information on
141 backup images for this day,
142 for the day before with the next lower dump level,
144 until the most recent level 0 backup on or before
145 the specified date is encountered.</para>
147 <para>For example, if:</para>
150 <literallayout remap='.nf'>
151 1996-07-01 was a level 0 backup
152 1996-07-02 through 1996-07-05 were level 1 backups
153 1996-07-06 through 1997-07-08 were level 2 backups
154 </literallayout> <!-- .fi -->
156 <para>then the command <emphasis remap='B'>setdate 1997-07-08-00</emphasis>
157 would yield files from the following days:</para>
160 <literallayout remap='.nf'>
161 1997-07-08 (the latest level 2 backup)
162 1997-07-05 (the latest level 1 backup)
163 1997-07-01 (the latest level 0 backup)
164 </literallayout> <!-- .fi -->
166 <para>Only the most recent version of a file will be presented.</para>
168 <para>The following abbreviated date specifications are accepted:</para>
170 <variablelist remap='TP'>
172 <term><option>--MM-DD</option></term>
174 <para>dates in the current year</para>
178 <term><option>---DD</option></term>
180 <para>dates in the current month of the current year</para>
188 <variablelist remap='TP'>
190 <term><emphasis remap='B'>setdisk</emphasis> <emphasis remap='I'>diskname</emphasis> [<emphasis remap='I'>mountpoint</emphasis>]</term>
192 <para>Specifies which disk to consider
193 (default: the disk holding the working directory where
194 <command>amrecover</command>
196 It can only be set after the host is set with
197 <emphasis remap='B'>sethost</emphasis>.
198 <emphasis remap='I'>Diskname</emphasis>
199 is the device name specified in the
200 <emphasis remap='I'>amanda.conf</emphasis>
202 The disk must be local to the host.
204 <emphasis remap='I'>mountpoint</emphasis>
205 is not specified, all pathnames will be relative to the (unknown)
206 mount point instead of full pathnames.</para>
210 <term><emphasis remap='B'>listhost</emphasis> [<emphasis remap='I'>diskdevice</emphasis>]</term>
213 <emphasis remap='B'>host</emphasis></para>
217 <term><emphasis remap='B'>listdisk</emphasis> [<emphasis remap='I'>diskdevice</emphasis>]</term>
220 <emphasis remap='B'>diskname</emphasis></para>
224 <term><emphasis remap='B'>listproperty</emphasis></term>
227 <emphasis remap='B'>property</emphasis></para>
231 <term><emphasis remap='B'>setproperty</emphasis> [<emphasis remap='B'>append</emphasis>] [<emphasis remap='B'>priority</emphasis>] <emphasis remap='I'>name</emphasis> [<emphasis remap='I'>value</emphasis> ...]</term>
233 <para>Set the property <emphasis remap='I'>name</emphasis> to the value <emphasis remap='I'>value</emphasis>.
234 The <emphasis remap='B'>append</emphasis> keyword appends the <emphasis remap='I'>value</emphasis> to the values already set for this property.
235 Without <emphasis remap='I'>value</emphasis>, the property is unset.
236 The <emphasis remap='B'>priority</emphasis> keyword is unused, it is present for ease of copy/paste from application definition.</para>
240 <term><emphasis remap='B'>setdevice</emphasis> [[-h <emphasis remap='I'>tape-server</emphasis>] <emphasis remap='I'>tapedev</emphasis>]</term>
242 <para>Specifies the host to use as the tape server, and which of its tape devices to use.
243 If the server is omitted, the server name reverts to the configure-time default.
244 If the tape device is omitted, the default is used.</para>
246 <para>If you want amrecover to use your changer, the
247 <emphasis remap='I'>tapedev</emphasis>
248 must be equal to the <amkeyword>amrecover-changer</amkeyword> setting on the server.</para>
250 <para>Since device names contain colons, you must always specify the hostname.</para>
253 settape 192.168.0.10:file:/file1
255 <para>You can change the tape device when amrecover ask you to load the tape:</para>
260 Tape device: server2:/dev/nst2
262 Using tape /dev/nst2 from server server2.
269 <variablelist remap='TP'>
271 <term><emphasis remap='B'>setmode</emphasis> <emphasis remap='I'>mode</emphasis></term>
273 <para>Set the extraction mode for Samba shares.
275 <emphasis remap='I'>mode</emphasis>
277 <emphasis remap='B'>smb</emphasis>,
278 shares are sent to the Samba server
279 to be restored back onto the PC.
281 <emphasis remap='I'>mode</emphasis>
283 <emphasis remap='B'>tar</emphasis>,
284 they are extracted on the local machine the same way tar volumes are extracted.</para>
288 <term><emphasis remap='B'>mode</emphasis></term>
290 <para>Displays the extracting mode for Samba shares.</para>
294 <term><emphasis remap='B'>history</emphasis></term>
296 <para>Show the backup history of the current host and disk.
297 Dates, levels, tapes and file position on tape of each backup are displayed.</para>
301 <term><emphasis remap='B'>pwd</emphasis></term>
303 <para>Display the name of the current backup working directory.</para>
307 <term><emphasis remap='B'>cd</emphasis> <emphasis remap='I'>dir</emphasis></term>
309 <para>Change the backup working directory to
310 <emphasis remap='I'>dir.</emphasis>
311 If the mount point was specified with
312 <emphasis remap='B'>setdisk</emphasis>,
313 this can be a full pathname or it can be
314 relative to the current backup working directory.
315 If the mount point was not specified,
316 paths are relative to the mount point if they start with "/",
317 otherwise they are relative to the current backup working directory.
319 <emphasis remap='I'>dir</emphasis>
320 can be a shell style wildcards.</para>
324 <term><emphasis remap='B'>cdx</emphasis> <emphasis remap='I'>dir</emphasis></term>
327 <emphasis remap='B'>cd</emphasis>
328 command but allow regular expression.</para>
332 <term><emphasis remap='B'>lpwd</emphasis></term>
335 <command>amrecover</command>
337 Files will be restored under this directory,
338 relative to the backed up filesystem.</para>
342 <term><emphasis remap='B'>lcd</emphasis> <emphasis remap='I'>path</emphasis></term>
345 <command>amrecover</command>
347 <emphasis remap='I'>path</emphasis>.</para>
351 <term><emphasis remap='B'>ls</emphasis></term>
353 <para>List the contents of the current backup working directory.
354 See the description of the
355 <emphasis remap='B'>setdate</emphasis>
356 command for how the view of the
357 directory is built up.
358 The backup date is shown for each file.</para>
362 <term><emphasis remap='B'>add</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
364 <para>Add the specified files or directories to the restore list.
365 Each item may have shell style wildcards.</para>
369 <term><emphasis remap='B'>addx</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
371 <para>Add the specified files or directories to the restore list.
372 Each item may be a regular expression.</para>
376 <term><emphasis remap='B'>delete</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
378 <para>Delete the specified files or directories from the restore list.
379 Each item may have shell style wildcards.</para>
383 <term><emphasis remap='B'>deletex</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
385 <para>Delete the specified files or directories from the restore list.
386 Each item may be a regular expression.</para>
390 <term><emphasis remap='B'>list</emphasis> <emphasis remap='I'>file</emphasis></term>
392 <para>Display the contents of the restore list.
393 If a file name is specified,
394 the restore list is written to that file.
395 This can be used to manually extract the files from the Amanda tapes with
396 <emphasis remap='B'>amrestore</emphasis>.</para>
400 <term><emphasis remap='B'>clear</emphasis></term>
402 <para>Clear the restore list.</para>
406 <term><emphasis remap='B'>quit</emphasis></term>
408 <para>Close the connection to the index server and exit.</para>
412 <term><emphasis remap='B'>exit</emphasis></term>
414 <para>Close the connection to the index server and exit.</para>
418 <term><emphasis remap='B'>extract</emphasis></term>
420 <para>Start the extract sequence (see the examples below). Make sure the
421 local working directory is the root of the backed up filesystem, or
422 another directory that will behave like that. Use
423 <emphasis remap='B'>lpwd</emphasis>
424 to display the local working directory, and
425 <emphasis remap='B'>lcd</emphasis>
430 <term><emphasis remap='B'>help</emphasis></term>
432 <para>Display a brief list of these commands.</para>
438 <refsect1><title>EXAMPLES</title>
439 <para>The following shows the recovery of an old
440 <emphasis remap='I'>syslog</emphasis>
446 syslog.7: No such file or directory
448 AMRECOVER Version 2.4.2. Contacting server on oops ...
449 220 oops Amanda index server (2.4.2) ready.
450 Setting restore date to today (1997-12-09)
451 200 Working date set to 1997-12-09.
452 200 Config set to MyConfig.
453 200 Dump host set to this-host.some.org.
454 $CWD '/var/log' is on disk '/var' mounted at '/var'.
455 200 Disk set to /var.
457 WARNING: not on root of selected filesystem, check man-page!
459 1997-12-09 daemon.log
462 1997-12-08 sysidconfig.log
471 amrecover> add syslog.7
477 amrecover> extract
479 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
481 The following tapes are needed: DMP014
483 Restoring files into directory /var
488 set owner/mode for '.'? [yn] n
493 -rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
496 <para>If you do not want to overwrite existing files,
497 create a subdirectory to run
498 <command>amrecover</command>
499 from and then move the restored files afterward.</para>
503 # (umask 077 ; mkdir .restore)
506 AMRECOVER Version 2.4.2. Contacting server on oops ...
512 amrecover> add syslog.7
516 amrecover> extract
518 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
522 # mv -i log/syslog.7 ../log/syslog.7-restored
527 <para>If you need to run
528 <emphasis remap='B'>amrestore</emphasis>
529 by hand instead of letting
530 <command>amrecover</command>
533 <emphasis remap='B'>list</emphasis>
534 command after browsing to display the needed tapes.</para>
539 AMRECOVER Version 2.4.2. Contacting server on oops ...
543 amrecover> add syslog syslog.6 syslog.7
548 TAPE DMP014 LEVEL 0 DATE 1997-12-08
551 TAPE DMP015 LEVEL 1 DATE 1997-12-09
557 <emphasis remap='B'>history</emphasis>
558 command shows each tape that has a backup of the
559 current disk along with the date of the backup,
562 and the file position on the tape.
563 All active tapes are listed, not just back to
564 the most recent full dump.</para>
566 <para>Tape file position zero is a label.
567 The first backup image is in file position one.</para>
572 AMRECOVER Version 2.4.2. Contacting server on oops ...
574 amrecover> history
575 200- Dump history for config "MyConfig" host "this-host.some.org" disk "/var"
576 201- 1997-12-09 1 DMP015 9
577 201- 1997-12-08 1 DMP014 11
578 201- 1997-12-07 0 DMP013 22
579 201- 1997-12-06 1 DMP012 16
580 201- 1997-12-05 1 DMP011 9
581 201- 1997-12-04 0 DMP010 11
582 201- 1997-12-03 1 DMP009 7
583 201- 1997-12-02 1 DMP008 7
584 201- 1997-12-01 1 DMP007 9
585 201- 1997-11-30 1 DMP006 6
591 <refsect1><title>ENVIRONMENT</title>
592 <para><envar>PAGER</envar>
595 <emphasis remap='B'>ls</emphasis>
597 <emphasis remap='B'>list</emphasis>
598 commands will use $PAGER to display the file lists.
600 <emphasis remap='I'>more</emphasis>
601 if PAGER is not set.</para>
602 <para><envar>AMANDA_SERVER</envar>
603 If set, $AMANDA_SERVER will be used as index-server.
604 The value will take precedence over the compiled default,
605 but will be overridden by the -s switch.
607 <para><envar>AMANDA_TAPE_SERVER</envar>
608 If set, $AMANDA_TAPE_SERVER will be used as tape-server.
609 The value will take precedence over the compiled default,
610 but will be overridden by the -t switch.
616 <manref name="amanda-client.conf" vol="5"/>
617 <manref name="amrestore" vol="8"/>
618 <manref name="amfetchdump" vol="8"/>
619 <manref name="readline" vol="3"/>