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 <group><arg choice='opt'>-C </arg><arg choice='plain'><replaceable>config</replaceable></arg></group>
27 <group><arg choice='plain'>-s </arg><arg choice='plain'><replaceable>index-server</replaceable></arg></group>
28 <group><arg choice='plain'>-t </arg><arg choice='plain'><replaceable>tape-server</replaceable></arg></group>
29 <group><arg choice='plain'>-d </arg><arg choice='plain'><replaceable>tape-device</replaceable></arg></group>
30 <group><arg choice='plain'>-o </arg><arg choice='plain'><replaceable>clientconfigoption</replaceable></arg></group>*
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>The Default values are those set at compile-time.
57 Use <command>amrestore</command> to recover client-encrypted or
58 client-custom-compressed tapes.</note>
59 <variablelist remap='TP'>
61 <term><emphasis remap='B'>[ -C ] config</emphasis></term>
63 <para>&A; configuration.</para>
67 <term><option>-s index-server</option></term>
69 <para>Host that runs the index daemon.</para>
73 <term><option>-t tape-server</option></term>
75 <para>Host that runs the tape server daemon.</para>
79 <term><option>-d tape-device</option></term>
81 <para>Tape device to use on the tape server host.</para>
86 <term><emphasis remap='B'>-o</emphasis> <replaceable>clientconfigoption</replaceable></term>
88 <para>See the "<emphasis remap='B'>CONFIGURATION OVERWRITE</emphasis>"
89 section in <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
96 <refsect1><title>COMMANDS</title>
97 <para><emphasis remap='B'>Amrecover</emphasis>
98 connects to the index server and then presents a command line prompt.
99 Usage is similar to an ftp client.
100 The GNU readline library is used to provide command line history and editing
101 if it was built in to
102 <command>amrecover</command>.</para>
104 <para>The purpose of browsing the database is to build up a
105 <emphasis remap='I'>restore list</emphasis>
106 of files to be extracted from the backup system.
107 The following commands are available:</para>
108 <variablelist remap='TP'>
110 <term><emphasis remap='B'>sethost hostname</emphasis></term>
112 <para>Specifies which host to look at backup files for (default: the local host).</para>
116 <term><emphasis remap='B'>setdate YYYY-MM-DD-HH-MM[-SS] | YYYY-MM-DD</emphasis></term>
118 <para>Set the restore time (default: now).
119 File listing commands only return information on
120 backup images for this day,
121 for the day before with the next lower dump level,
123 until the most recent level 0 backup on or before
124 the specified date is encountered.</para>
126 <para>For example, if:</para>
129 <literallayout remap='.nf'>
130 1996-07-01 was a level 0 backup
131 1996-07-02 through 1996-07-05 were level 1 backups
132 1996-07-06 through 1997-07-08 were level 2 backups
133 </literallayout> <!-- .fi -->
135 <para>then the command <emphasis remap='B'>setdate 1997-07-08-00</emphasis>
136 would yield files from the following days:</para>
139 <literallayout remap='.nf'>
140 1997-07-08 (the latest level 2 backup)
141 1997-07-05 (the latest level 1 backup)
142 1997-07-01 (the latest level 0 backup)
143 </literallayout> <!-- .fi -->
145 <para>Only the most recent version of a file will be presented.</para>
147 <para>The following abbreviated date specifications are accepted:</para>
149 <variablelist remap='TP'>
151 <term><option>--MM-DD</option></term>
153 <para>dates in the current year</para>
157 <term><option>---DD</option></term>
159 <para>dates in the current month of the current year</para>
167 <variablelist remap='TP'>
169 <term><emphasis remap='B'>setdisk <arg
170 choice='plain'><replaceable>diskname</replaceable></arg> <arg
171 choice='opt'><replaceable>mountpoint</replaceable></arg></emphasis></term>
173 <para>Specifies which disk to consider
174 (default: the disk holding the working directory where
175 <command>amrecover</command>
177 It can only be set after the host is set with
178 <emphasis remap='B'>sethost</emphasis>.
179 <emphasis remap='I'>Diskname</emphasis>
180 is the device name specified in the
181 <emphasis remap='I'>amanda.conf</emphasis>
183 <emphasis remap='I'>disklist</emphasis>
185 The disk must be local to the host.
187 <emphasis remap='I'>mountpoint</emphasis>
188 is not specified, all pathnames will be relative to the (unknown)
189 mount point instead of full pathnames.</para>
193 <term><emphasis remap='B'>listhost [diskdevice]</emphasis></term>
196 <emphasis remap='B'>host</emphasis></para>
200 <term><emphasis remap='B'>listdisk [diskdevice]</emphasis></term>
203 <emphasis remap='B'>diskname</emphasis></para>
207 <term><emphasis remap='B'>settape [[server]:][tapedev|default]</emphasis></term>
209 <para>Specifies the host to use as the tape server, and which of its tape
211 If the server is omitted, but the colon is not, the
212 server name reverts to the configure-time
214 If the tape device is omitted, it remains unchanged.
215 To use the default tape device selected by the tape server, the word
216 <emphasis remap='I'>default</emphasis>
218 If no argument is specified, or the argument is an
219 empty string, no changes occur, and the current settings are
222 <para>If you want amrecover to use your changer, the
223 <emphasis remap='I'>tapedev</emphasis>
224 must be equal to the amrecover_changer setting on the server.</para>
226 <para>If you need to change the protocol (tape:, rait:, file:, null:) then you
227 must specify the hostname.</para>
230 settape 192.168.0.10:file:/file1
233 <para>You can change the tape device when amrecover ask you to load the tape:</para>
238 Tape device: server2:/dev/nst2
240 Using tape /dev/nst2 from server server2.
247 <variablelist remap='TP'>
249 <term><emphasis remap='B'>setmode mode</emphasis></term>
251 <para>Set the extraction mode for Samba shares.
253 <emphasis remap='I'>mode</emphasis>
255 <emphasis remap='B'>smb</emphasis>,
256 shares are sent to the Samba server
257 to be restored back onto the PC.
259 <emphasis remap='I'>mode</emphasis>
261 <emphasis remap='B'>tar</emphasis>,
262 they are extracted on the local machine the same way tar volumes are extracted.</para>
266 <term><emphasis remap='B'>mode</emphasis></term>
268 <para>Displays the extracting mode for Samba shares.</para>
272 <term><emphasis remap='B'>history</emphasis></term>
274 <para>Show the backup history of the current host and disk.
275 Dates, levels, tapes and file position on tape of each backup are displayed.</para>
279 <term><emphasis remap='B'>pwd</emphasis></term>
281 <para>Display the name of the current backup working directory.</para>
285 <term><emphasis remap='B'>cd dir</emphasis></term>
287 <para>Change the backup working directory to
288 <emphasis remap='I'>dir.</emphasis>
289 If the mount point was specified with
290 <emphasis remap='B'>setdisk</emphasis>,
291 this can be a full pathname or it can be
292 relative to the current backup working directory.
293 If the mount point was not specified,
294 paths are relative to the mount point if they start with "/",
295 otherwise they are relative to the current backup working directory.
297 <emphasis remap='I'>dir</emphasis>
298 can be a shell style wildcards.</para>
302 <term><emphasis remap='B'>cdx dir</emphasis></term>
305 <emphasis remap='B'>cd</emphasis>
306 command but allow regular expression.</para>
310 <term><emphasis remap='B'>lpwd</emphasis></term>
313 <command>amrecover</command>
315 Files will be restored under this directory,
316 relative to the backed up filesystem.</para>
320 <term><emphasis remap='B'>lcd path</emphasis></term>
323 <command>amrecover</command>
325 <emphasis remap='I'>path</emphasis>.</para>
329 <term><emphasis remap='B'>ls</emphasis></term>
331 <para>List the contents of the current backup working directory.
332 See the description of the
333 <emphasis remap='B'>setdate</emphasis>
334 command for how the view of the
335 directory is built up.
336 The backup date is shown for each file.</para>
340 <term><emphasis remap='B'>add item1 item2 ...</emphasis></term>
342 <para>Add the specified files or directories to the restore list.
343 Each item may have shell style wildcards.</para>
347 <term><emphasis remap='B'>addx item1 item2 ...</emphasis></term>
349 <para>Add the specified files or directories to the restore list.
350 Each item may be a regular expression.</para>
354 <term><emphasis remap='B'>delete item1 item2 ...</emphasis></term>
356 <para>Delete the specified files or directories from the restore list.
357 Each item may have shell style wildcards.</para>
361 <term><emphasis remap='B'>deletex item1 item2 ...</emphasis></term>
363 <para>Delete the specified files or directories from the restore list.
364 Each item may be a regular expression.</para>
368 <term><emphasis remap='B'>list file</emphasis></term>
370 <para>Display the contents of the restore list.
371 If a file name is specified,
372 the restore list is written to that file.
373 This can be used to manually extract the files from the &A; tapes with
374 <emphasis remap='B'>amrestore</emphasis>.</para>
378 <term><emphasis remap='B'>clear</emphasis></term>
380 <para>Clear the restore list.</para>
384 <term><emphasis remap='B'>quit</emphasis></term>
386 <para>Close the connection to the index server and exit.</para>
390 <term><emphasis remap='B'>exit</emphasis></term>
392 <para>Close the connection to the index server and exit.</para>
396 <term><emphasis remap='B'>extract</emphasis></term>
398 <para>Start the extract sequence (see the examples below). Make sure the
399 local working directory is the root of the backed up filesystem, or
400 another directory that will behave like that. Use
401 <emphasis remap='B'>lpwd</emphasis>
402 to display the local working directory, and
403 <emphasis remap='B'>lcd</emphasis>
408 <term><emphasis remap='B'>help</emphasis></term>
410 <para>Display a brief list of these commands.</para>
416 <refsect1><title>EXAMPLES</title>
417 <para>The following shows the recovery of an old
418 <emphasis remap='I'>syslog</emphasis>
424 syslog.7: No such file or directory
426 AMRECOVER Version 2.4.2. Contacting server on oops ...
427 220 oops &A; index server (2.4.2) ready.
428 Setting restore date to today (1997-12-09)
429 200 Working date set to 1997-12-09.
430 200 Config set to daily.
431 200 Dump host set to this-host.some.org.
432 $CWD '/var/log' is on disk '/var' mounted at '/var'.
433 200 Disk set to /var.
435 WARNING: not on root of selected filesystem, check man-page!
437 1997-12-09 daemon.log
440 1997-12-08 sysidconfig.log
449 amrecover> add syslog.7
455 amrecover> extract
457 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
459 The following tapes are needed: DMP014
461 Restoring files into directory /var
466 set owner/mode for '.'? [yn] n
471 -rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
474 <para>If you do not want to overwrite existing files,
475 create a subdirectory to run
476 <command>amrecover</command>
477 from and then move the restored files afterward.</para>
481 # (umask 077 ; mkdir .restore)
484 AMRECOVER Version 2.4.2. Contacting server on oops ...
490 amrecover> add syslog.7
494 amrecover> extract
496 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
500 # mv -i log/syslog.7 ../log/syslog.7-restored
505 <para>If you need to run
506 <emphasis remap='B'>amrestore</emphasis>
507 by hand instead of letting
508 <command>amrecover</command>
511 <emphasis remap='B'>list</emphasis>
512 command after browsing to display the needed tapes.</para>
517 AMRECOVER Version 2.4.2. Contacting server on oops ...
521 amrecover> add syslog syslog.6 syslog.7
526 TAPE DMP014 LEVEL 0 DATE 1997-12-08
529 TAPE DMP015 LEVEL 1 DATE 1997-12-09
535 <emphasis remap='B'>history</emphasis>
536 command shows each tape that has a backup of the
537 current disk along with the date of the backup,
540 and the file position on the tape.
541 All active tapes are listed, not just back to
542 the most recent full dump.</para>
544 <para>Tape file position zero is a label.
545 The first backup image is in file position one.</para>
550 AMRECOVER Version 2.4.2. Contacting server on oops ...
552 amrecover> history
553 200- Dump history for config "daily" host "this-host.some.org" disk "/var"
554 201- 1997-12-09 1 DMP015 9
555 201- 1997-12-08 1 DMP014 11
556 201- 1997-12-07 0 DMP013 22
557 201- 1997-12-06 1 DMP012 16
558 201- 1997-12-05 1 DMP011 9
559 201- 1997-12-04 0 DMP010 11
560 201- 1997-12-03 1 DMP009 7
561 201- 1997-12-02 1 DMP008 7
562 201- 1997-12-01 1 DMP007 9
563 201- 1997-11-30 1 DMP006 6
569 <refsect1><title>ENVIRONMENT</title>
570 <para><envar>PAGER</envar>
573 <emphasis remap='B'>ls</emphasis>
575 <emphasis remap='B'>list</emphasis>
576 commands will use $PAGER to display the file lists.
578 <emphasis remap='I'>more</emphasis>
579 if PAGER is not set.</para>
580 <para><envar>AMANDA_SERVER</envar>
581 If set, $AMANDA_SERVER will be used as index-server.
582 The value will take precedence over the compiled default,
583 but will be overridden by the -s switch.
585 <para><envar>AMANDA_TAPE_SERVER</envar>
586 If set, $AMANDA_TAPE_SERVER will be used as tape-server.
587 The value will take precedence over the compiled default,
588 but will be overridden by the -t switch.
593 <refsect1><title>AUTHOR</title>
594 <para>Alan M. McIvor <email>alan@kauri.auck.irl.cri.nz</email> : Original text</para>
595 <para>&maintainer.sgw;: XML-conversion</para>
598 <refsect1><title>SEE ALSO</title>
599 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
600 <citerefentry><refentrytitle>amanda-client.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
601 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
602 <citerefentry><refentrytitle>amfetchdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
603 <citerefentry><refentrytitle>readline</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>