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 OVERRIDE</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'>setdevice</emphasis> [[-h <emphasis remap='I'>tape-server</emphasis>] <emphasis remap='I'>tapedev</emphasis>]</term>
208 <para>Specifies the host to use as the tape server, and which of its tape devices to use.
209 If the server is omitted, the server name reverts to the configure-time default.
210 If the tape device is omitted, the default is used.</para>
212 <para>If you want amrecover to use your changer, the
213 <emphasis remap='I'>tapedev</emphasis>
214 must be equal to the amrecover_changer setting on the server.</para>
216 <para>If you need to change the protocol (tape:, rait:, file:, null:) then you
217 must specify the hostname.</para>
220 settape 192.168.0.10:file:/file1
222 <para>You can change the tape device when amrecover ask you to load the tape:</para>
227 Tape device: server2:/dev/nst2
229 Using tape /dev/nst2 from server server2.
236 <variablelist remap='TP'>
238 <term><emphasis remap='B'>setmode</emphasis> <emphasis remap='I'>mode</emphasis></term>
240 <para>Set the extraction mode for Samba shares.
242 <emphasis remap='I'>mode</emphasis>
244 <emphasis remap='B'>smb</emphasis>,
245 shares are sent to the Samba server
246 to be restored back onto the PC.
248 <emphasis remap='I'>mode</emphasis>
250 <emphasis remap='B'>tar</emphasis>,
251 they are extracted on the local machine the same way tar volumes are extracted.</para>
255 <term><emphasis remap='B'>mode</emphasis></term>
257 <para>Displays the extracting mode for Samba shares.</para>
261 <term><emphasis remap='B'>history</emphasis></term>
263 <para>Show the backup history of the current host and disk.
264 Dates, levels, tapes and file position on tape of each backup are displayed.</para>
268 <term><emphasis remap='B'>pwd</emphasis></term>
270 <para>Display the name of the current backup working directory.</para>
274 <term><emphasis remap='B'>cd</emphasis> <emphasis remap='I'>dir</emphasis></term>
276 <para>Change the backup working directory to
277 <emphasis remap='I'>dir.</emphasis>
278 If the mount point was specified with
279 <emphasis remap='B'>setdisk</emphasis>,
280 this can be a full pathname or it can be
281 relative to the current backup working directory.
282 If the mount point was not specified,
283 paths are relative to the mount point if they start with "/",
284 otherwise they are relative to the current backup working directory.
286 <emphasis remap='I'>dir</emphasis>
287 can be a shell style wildcards.</para>
291 <term><emphasis remap='B'>cdx</emphasis> <emphasis remap='I'>dir</emphasis></term>
294 <emphasis remap='B'>cd</emphasis>
295 command but allow regular expression.</para>
299 <term><emphasis remap='B'>lpwd</emphasis></term>
302 <command>amrecover</command>
304 Files will be restored under this directory,
305 relative to the backed up filesystem.</para>
309 <term><emphasis remap='B'>lcd</emphasis> <emphasis remap='I'>path</emphasis></term>
312 <command>amrecover</command>
314 <emphasis remap='I'>path</emphasis>.</para>
318 <term><emphasis remap='B'>ls</emphasis></term>
320 <para>List the contents of the current backup working directory.
321 See the description of the
322 <emphasis remap='B'>setdate</emphasis>
323 command for how the view of the
324 directory is built up.
325 The backup date is shown for each file.</para>
329 <term><emphasis remap='B'>add</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
331 <para>Add the specified files or directories to the restore list.
332 Each item may have shell style wildcards.</para>
336 <term><emphasis remap='B'>addx</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
338 <para>Add the specified files or directories to the restore list.
339 Each item may be a regular expression.</para>
343 <term><emphasis remap='B'>delete</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
345 <para>Delete the specified files or directories from the restore list.
346 Each item may have shell style wildcards.</para>
350 <term><emphasis remap='B'>deletex</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
352 <para>Delete the specified files or directories from the restore list.
353 Each item may be a regular expression.</para>
357 <term><emphasis remap='B'>list</emphasis> <emphasis remap='I'>file</emphasis></term>
359 <para>Display the contents of the restore list.
360 If a file name is specified,
361 the restore list is written to that file.
362 This can be used to manually extract the files from the &A; tapes with
363 <emphasis remap='B'>amrestore</emphasis>.</para>
367 <term><emphasis remap='B'>clear</emphasis></term>
369 <para>Clear the restore list.</para>
373 <term><emphasis remap='B'>quit</emphasis></term>
375 <para>Close the connection to the index server and exit.</para>
379 <term><emphasis remap='B'>exit</emphasis></term>
381 <para>Close the connection to the index server and exit.</para>
385 <term><emphasis remap='B'>extract</emphasis></term>
387 <para>Start the extract sequence (see the examples below). Make sure the
388 local working directory is the root of the backed up filesystem, or
389 another directory that will behave like that. Use
390 <emphasis remap='B'>lpwd</emphasis>
391 to display the local working directory, and
392 <emphasis remap='B'>lcd</emphasis>
397 <term><emphasis remap='B'>help</emphasis></term>
399 <para>Display a brief list of these commands.</para>
405 <refsect1><title>EXAMPLES</title>
406 <para>The following shows the recovery of an old
407 <emphasis remap='I'>syslog</emphasis>
413 syslog.7: No such file or directory
415 AMRECOVER Version 2.4.2. Contacting server on oops ...
416 220 oops &A; index server (2.4.2) ready.
417 Setting restore date to today (1997-12-09)
418 200 Working date set to 1997-12-09.
419 200 Config set to daily.
420 200 Dump host set to this-host.some.org.
421 $CWD '/var/log' is on disk '/var' mounted at '/var'.
422 200 Disk set to /var.
424 WARNING: not on root of selected filesystem, check man-page!
426 1997-12-09 daemon.log
429 1997-12-08 sysidconfig.log
438 amrecover> add syslog.7
444 amrecover> extract
446 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
448 The following tapes are needed: DMP014
450 Restoring files into directory /var
455 set owner/mode for '.'? [yn] n
460 -rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
463 <para>If you do not want to overwrite existing files,
464 create a subdirectory to run
465 <command>amrecover</command>
466 from and then move the restored files afterward.</para>
470 # (umask 077 ; mkdir .restore)
473 AMRECOVER Version 2.4.2. Contacting server on oops ...
479 amrecover> add syslog.7
483 amrecover> extract
485 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
489 # mv -i log/syslog.7 ../log/syslog.7-restored
494 <para>If you need to run
495 <emphasis remap='B'>amrestore</emphasis>
496 by hand instead of letting
497 <command>amrecover</command>
500 <emphasis remap='B'>list</emphasis>
501 command after browsing to display the needed tapes.</para>
506 AMRECOVER Version 2.4.2. Contacting server on oops ...
510 amrecover> add syslog syslog.6 syslog.7
515 TAPE DMP014 LEVEL 0 DATE 1997-12-08
518 TAPE DMP015 LEVEL 1 DATE 1997-12-09
524 <emphasis remap='B'>history</emphasis>
525 command shows each tape that has a backup of the
526 current disk along with the date of the backup,
529 and the file position on the tape.
530 All active tapes are listed, not just back to
531 the most recent full dump.</para>
533 <para>Tape file position zero is a label.
534 The first backup image is in file position one.</para>
539 AMRECOVER Version 2.4.2. Contacting server on oops ...
541 amrecover> history
542 200- Dump history for config "daily" host "this-host.some.org" disk "/var"
543 201- 1997-12-09 1 DMP015 9
544 201- 1997-12-08 1 DMP014 11
545 201- 1997-12-07 0 DMP013 22
546 201- 1997-12-06 1 DMP012 16
547 201- 1997-12-05 1 DMP011 9
548 201- 1997-12-04 0 DMP010 11
549 201- 1997-12-03 1 DMP009 7
550 201- 1997-12-02 1 DMP008 7
551 201- 1997-12-01 1 DMP007 9
552 201- 1997-11-30 1 DMP006 6
558 <refsect1><title>ENVIRONMENT</title>
559 <para><envar>PAGER</envar>
562 <emphasis remap='B'>ls</emphasis>
564 <emphasis remap='B'>list</emphasis>
565 commands will use $PAGER to display the file lists.
567 <emphasis remap='I'>more</emphasis>
568 if PAGER is not set.</para>
569 <para><envar>AMANDA_SERVER</envar>
570 If set, $AMANDA_SERVER will be used as index-server.
571 The value will take precedence over the compiled default,
572 but will be overridden by the -s switch.
574 <para><envar>AMANDA_TAPE_SERVER</envar>
575 If set, $AMANDA_TAPE_SERVER will be used as tape-server.
576 The value will take precedence over the compiled default,
577 but will be overridden by the -t switch.
582 <refsect1><title>AUTHOR</title>
583 <para>Alan M. McIvor <email>alan@kauri.auck.irl.cri.nz</email> : Original text</para>
584 <para>&maintainer.sgw;: XML-conversion</para>
587 <refsect1><title>SEE ALSO</title>
588 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
589 <citerefentry><refentrytitle>amanda-client.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
590 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
591 <citerefentry><refentrytitle>amfetchdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
592 <citerefentry><refentrytitle>readline</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
593 <citerefentry><refentrytitle>http://wiki.zmanda.com</refentrytitle></citerefentry>