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 '../entities/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>
19 <refname>amrecover</refname>
20 <refpurpose>&A; index database browser</refpurpose>
22 <!-- body begins here -->
25 <command>amrecover</command>
26 <arg choice='opt'>-C <replaceable>config</replaceable></arg>
27 <arg choice='opt'>-s <replaceable>index-server</replaceable></arg>
28 <arg choice='opt'>-t <replaceable>tape-server</replaceable></arg>
29 <arg choice='opt'>-d <replaceable>tape-device</replaceable></arg>
30 <arg choice='plain' rep='repeat'><group><arg choice='plain'>-o </arg><replaceable>configoption</replaceable></group></arg>
35 <refsect1><title>DESCRIPTION</title>
36 <para><emphasis remap='B'>Amrecover</emphasis>
37 browses the database of &A; index files to determine which tapes
38 contain files to recover. Furthermore, it is able to recover files.</para>
40 <para>In order to restore files in place, you must invoke
41 <command>amrecover</command>
42 from the root of the backed up filesystem, or use
43 <emphasis remap='B'>lcd</emphasis>
44 to move into that directory, otherwise a directory tree that resembles
45 the backed up filesystem will be created in the current directory.
46 See the examples below for details.</para>
48 <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.</para>
51 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
52 man page for more details about &A;.</para>
55 <refsect1><title>OPTIONS</title>
56 <note><para>The Default values are those set at compile-time.
57 Use <command>amrestore</command> to recover client-encrypted or
58 client-custom-compressed tapes.</para>
60 <variablelist remap='TP'>
62 <term><emphasis remap='B'>[ -C ] config</emphasis></term>
64 <para>&A; configuration.</para>
68 <term><option>-s index-server</option></term>
70 <para>Host that runs the index daemon.</para>
74 <term><option>-t tape-server</option></term>
76 <para>Host that runs the tape server daemon.</para>
80 <term><option>-d tape-device</option></term>
82 <para>Tape device to use on the tape server host.</para>
87 <term><emphasis remap='B'>-o</emphasis> <replaceable>clientconfigoption</replaceable></term>
89 <para>See the "<emphasis remap='B'>CONFIGURATION OVERWRITE</emphasis>"
90 section in <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
97 <refsect1><title>COMMANDS</title>
98 <para><emphasis remap='B'>Amrecover</emphasis>
99 connects to the index server and then presents a command line prompt.
100 Usage is similar to an ftp client.
101 The GNU readline library is used to provide command line history and editing
102 if it was built in to
103 <command>amrecover</command>.</para>
105 <para>The purpose of browsing the database is to build up a
106 <emphasis remap='I'>restore list</emphasis>
107 of files to be extracted from the backup system.
108 The following commands are available:</para>
109 <variablelist remap='TP'>
111 <term><emphasis remap='B'>sethost hostname</emphasis></term>
113 <para>Specifies which host to look at backup files for (default: the local host).</para>
117 <term><emphasis remap='B'>setdate YYYY-MM-DD-HH-MM[-SS] | YYYY-MM-DD</emphasis></term>
119 <para>Set the restore time (default: now).
120 File listing commands only return information on
121 backup images for this day,
122 for the day before with the next lower dump level,
124 until the most recent level 0 backup on or before
125 the specified date is encountered.</para>
127 <para>For example, if:</para>
130 <literallayout remap='.nf'>
131 1996-07-01 was a level 0 backup
132 1996-07-02 through 1996-07-05 were level 1 backups
133 1996-07-06 through 1997-07-08 were level 2 backups
134 </literallayout> <!-- .fi -->
136 <para>then the command <emphasis remap='B'>setdate 1997-07-08-00</emphasis>
137 would yield files from the following days:</para>
140 <literallayout remap='.nf'>
141 1997-07-08 (the latest level 2 backup)
142 1997-07-05 (the latest level 1 backup)
143 1997-07-01 (the latest level 0 backup)
144 </literallayout> <!-- .fi -->
146 <para>Only the most recent version of a file will be presented.</para>
148 <para>The following abbreviated date specifications are accepted:</para>
150 <variablelist remap='TP'>
152 <term><option>--MM-DD</option></term>
154 <para>dates in the current year</para>
158 <term><option>---DD</option></term>
160 <para>dates in the current month of the current year</para>
168 <variablelist remap='TP'>
170 <term><emphasis remap='B'>setdisk </emphasis><emphasis remap='I'>diskname</emphasis> [<emphasis remap='I'>mountpoint</emphasis>]</term>
172 <para>Specifies which disk to consider
173 (default: the disk holding the working directory where
174 <command>amrecover</command>
176 It can only be set after the host is set with
177 <emphasis remap='B'>sethost</emphasis>.
178 <emphasis remap='I'>Diskname</emphasis>
179 is the device name specified in the
180 <emphasis remap='I'>amanda.conf</emphasis>
182 <emphasis remap='I'>disklist</emphasis>
184 The disk must be local to the host.
186 <emphasis remap='I'>mountpoint</emphasis>
187 is not specified, all pathnames will be relative to the (unknown)
188 mount point instead of full pathnames.</para>
192 <term><emphasis remap='B'>listhost </emphasis>[<emphasis remap='I'>diskdevice</emphasis>]</term>
195 <emphasis remap='B'>host</emphasis></para>
199 <term><emphasis remap='B'>listdisk </emphasis>[<emphasis remap='I'>diskdevice</emphasis>]</term>
202 <emphasis remap='B'>diskname</emphasis></para>
206 <term><emphasis remap='B'>settape </emphasis>[[<emphasis remap='I'>server</emphasis>]:][<emphasis remap='I'>tapedev</emphasis>|<emphasis remap='I'>default</emphasis>]</term>
208 <para>Specifies the host to use as the tape server, and which of its tape
210 If the server is omitted, but the colon is not, the
211 server name reverts to the configure-time
213 If the tape device is omitted, it remains unchanged.
214 To use the default tape device selected by the tape server, the word
215 <emphasis remap='I'>default</emphasis>
217 If no argument is specified, or the argument is an
218 empty string, no changes occur, and the current settings are
221 <para>If you want amrecover to use your changer, the
222 <emphasis remap='I'>tapedev</emphasis>
223 must be equal to the amrecover_changer setting on the server.</para>
225 <para>If you need to change the protocol (tape:, rait:, file:, null:) then you
226 must specify the hostname.</para>
229 settape 192.168.0.10:file:/file1
231 <para>You can change the tape device when amrecover ask you to load the tape:</para>
236 Tape device: server2:/dev/nst2
238 Using tape /dev/nst2 from server server2.
245 <variablelist remap='TP'>
247 <term><emphasis remap='B'>setmode </emphasis><emphasis remap='I'>mode</emphasis></term>
249 <para>Set the extraction mode for Samba shares.
251 <emphasis remap='I'>mode</emphasis>
253 <emphasis remap='B'>smb</emphasis>,
254 shares are sent to the Samba server
255 to be restored back onto the PC.
257 <emphasis remap='I'>mode</emphasis>
259 <emphasis remap='B'>tar</emphasis>,
260 they are extracted on the local machine the same way tar volumes are extracted.</para>
264 <term><emphasis remap='B'>mode</emphasis></term>
266 <para>Displays the extracting mode for Samba shares.</para>
270 <term><emphasis remap='B'>history</emphasis></term>
272 <para>Show the backup history of the current host and disk.
273 Dates, levels, tapes and file position on tape of each backup are displayed.</para>
277 <term><emphasis remap='B'>pwd</emphasis></term>
279 <para>Display the name of the current backup working directory.</para>
283 <term><emphasis remap='B'>cd dir</emphasis></term>
285 <para>Change the backup working directory to
286 <emphasis remap='I'>dir.</emphasis>
287 If the mount point was specified with
288 <emphasis remap='B'>setdisk</emphasis>,
289 this can be a full pathname or it can be
290 relative to the current backup working directory.
291 If the mount point was not specified,
292 paths are relative to the mount point if they start with "/",
293 otherwise they are relative to the current backup working directory.
295 <emphasis remap='I'>dir</emphasis>
296 can be a shell style wildcards.</para>
300 <term><emphasis remap='B'>cdx </emphasis><emphasis remap='I'>dir</emphasis></term>
303 <emphasis remap='B'>cd</emphasis>
304 command but allow regular expression.</para>
308 <term><emphasis remap='B'>lpwd</emphasis></term>
311 <command>amrecover</command>
313 Files will be restored under this directory,
314 relative to the backed up filesystem.</para>
318 <term><emphasis remap='B'>lcd </emphasis><emphasis remap='I'>path</emphasis></term>
321 <command>amrecover</command>
323 <emphasis remap='I'>path</emphasis>.</para>
327 <term><emphasis remap='B'>ls</emphasis></term>
329 <para>List the contents of the current backup working directory.
330 See the description of the
331 <emphasis remap='B'>setdate</emphasis>
332 command for how the view of the
333 directory is built up.
334 The backup date is shown for each file.</para>
338 <term><emphasis remap='B'>add </emphasis><emphasis remap='I'>item1 item2 ...</emphasis></term>
340 <para>Add the specified files or directories to the restore list.
341 Each item may have shell style wildcards.</para>
345 <term><emphasis remap='B'>addx </emphasis><emphasis remap='I'>item1 item2 ...</emphasis></term>
347 <para>Add the specified files or directories to the restore list.
348 Each item may be a regular expression.</para>
352 <term><emphasis remap='B'>delete </emphasis><emphasis remap='I'>item1 item2 ...</emphasis></term>
354 <para>Delete the specified files or directories from the restore list.
355 Each item may have shell style wildcards.</para>
359 <term><emphasis remap='B'>deletex </emphasis><emphasis remap='I'>item1 item2 ...</emphasis></term>
361 <para>Delete the specified files or directories from the restore list.
362 Each item may be a regular expression.</para>
366 <term><emphasis remap='B'>list </emphasis><emphasis remap='I'>file</emphasis></term>
368 <para>Display the contents of the restore list.
369 If a file name is specified,
370 the restore list is written to that file.
371 This can be used to manually extract the files from the &A; tapes with
372 <emphasis remap='B'>amrestore</emphasis>.</para>
376 <term><emphasis remap='B'>clear</emphasis></term>
378 <para>Clear the restore list.</para>
382 <term><emphasis remap='B'>quit</emphasis></term>
384 <para>Close the connection to the index server and exit.</para>
388 <term><emphasis remap='B'>exit</emphasis></term>
390 <para>Close the connection to the index server and exit.</para>
394 <term><emphasis remap='B'>extract</emphasis></term>
396 <para>Start the extract sequence (see the examples below). Make sure the
397 local working directory is the root of the backed up filesystem, or
398 another directory that will behave like that. Use
399 <emphasis remap='B'>lpwd</emphasis>
400 to display the local working directory, and
401 <emphasis remap='B'>lcd</emphasis>
406 <term><emphasis remap='B'>help</emphasis></term>
408 <para>Display a brief list of these commands.</para>
414 <refsect1><title>EXAMPLES</title>
415 <para>The following shows the recovery of an old
416 <emphasis remap='I'>syslog</emphasis>
422 syslog.7: No such file or directory
424 AMRECOVER Version 2.4.2. Contacting server on oops ...
425 220 oops &A; index server (2.4.2) ready.
426 Setting restore date to today (1997-12-09)
427 200 Working date set to 1997-12-09.
428 200 Config set to daily.
429 200 Dump host set to this-host.some.org.
430 $CWD '/var/log' is on disk '/var' mounted at '/var'.
431 200 Disk set to /var.
433 WARNING: not on root of selected filesystem, check man-page!
435 1997-12-09 daemon.log
438 1997-12-08 sysidconfig.log
447 amrecover> add syslog.7
453 amrecover> extract
455 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
457 The following tapes are needed: DMP014
459 Restoring files into directory /var
464 set owner/mode for '.'? [yn] n
469 -rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
472 <para>If you do not want to overwrite existing files,
473 create a subdirectory to run
474 <command>amrecover</command>
475 from and then move the restored files afterward.</para>
479 # (umask 077 ; mkdir .restore)
482 AMRECOVER Version 2.4.2. Contacting server on oops ...
488 amrecover> add syslog.7
492 amrecover> extract
494 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
498 # mv -i log/syslog.7 ../log/syslog.7-restored
503 <para>If you need to run
504 <emphasis remap='B'>amrestore</emphasis>
505 by hand instead of letting
506 <command>amrecover</command>
509 <emphasis remap='B'>list</emphasis>
510 command after browsing to display the needed tapes.</para>
515 AMRECOVER Version 2.4.2. Contacting server on oops ...
519 amrecover> add syslog syslog.6 syslog.7
524 TAPE DMP014 LEVEL 0 DATE 1997-12-08
527 TAPE DMP015 LEVEL 1 DATE 1997-12-09
533 <emphasis remap='B'>history</emphasis>
534 command shows each tape that has a backup of the
535 current disk along with the date of the backup,
538 and the file position on the tape.
539 All active tapes are listed, not just back to
540 the most recent full dump.</para>
542 <para>Tape file position zero is a label.
543 The first backup image is in file position one.</para>
548 AMRECOVER Version 2.4.2. Contacting server on oops ...
550 amrecover> history
551 200- Dump history for config "daily" host "this-host.some.org" disk "/var"
552 201- 1997-12-09 1 DMP015 9
553 201- 1997-12-08 1 DMP014 11
554 201- 1997-12-07 0 DMP013 22
555 201- 1997-12-06 1 DMP012 16
556 201- 1997-12-05 1 DMP011 9
557 201- 1997-12-04 0 DMP010 11
558 201- 1997-12-03 1 DMP009 7
559 201- 1997-12-02 1 DMP008 7
560 201- 1997-12-01 1 DMP007 9
561 201- 1997-11-30 1 DMP006 6
567 <refsect1><title>ENVIRONMENT</title>
568 <para><envar>PAGER</envar>
571 <emphasis remap='B'>ls</emphasis>
573 <emphasis remap='B'>list</emphasis>
574 commands will use $PAGER to display the file lists.
576 <emphasis remap='I'>more</emphasis>
577 if PAGER is not set.</para>
578 <para><envar>AMANDA_SERVER</envar>
579 If set, $AMANDA_SERVER will be used as index-server.
580 The value will take precedence over the compiled default,
581 but will be overridden by the -s switch.
583 <para><envar>AMANDA_TAPE_SERVER</envar>
584 If set, $AMANDA_TAPE_SERVER will be used as tape-server.
585 The value will take precedence over the compiled default,
586 but will be overridden by the -t switch.
591 <refsect1><title>AUTHOR</title>
592 <para>Alan M. McIvor <email>alan@kauri.auck.irl.cri.nz</email> : Original text</para>
593 <para>&maintainer.sgw;: XML-conversion</para>
596 <refsect1><title>SEE ALSO</title>
597 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
598 <citerefentry><refentrytitle>amanda-client.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
599 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
600 <citerefentry><refentrytitle>amfetchdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
601 <citerefentry><refentrytitle>readline</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>