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>
22 <refname>amrecover</refname>
23 <refpurpose>&A; index database browser</refpurpose>
29 <!-- body begins here -->
32 <command>amrecover</command>
33 <arg choice='opt'>-C <replaceable>config</replaceable></arg>
34 <arg choice='opt'>-s <replaceable>index-server</replaceable></arg>
35 <arg choice='opt'>-t <replaceable>tape-server</replaceable></arg>
36 <arg choice='opt'>-d <replaceable>tape-device</replaceable></arg>
37 <arg choice='plain' rep='repeat'><group><arg choice='plain'>-o </arg><replaceable>configoption</replaceable></group></arg>
42 <refsect1><title>DESCRIPTION</title>
43 <para><emphasis remap='B'>Amrecover</emphasis>
44 browses the database of &A; index files to determine which tapes
45 contain files to recover. Furthermore, it is able to recover files.</para>
47 <para>In order to restore files in place, you must invoke
48 <command>amrecover</command>
49 from the root of the backed up filesystem, or use
50 <emphasis remap='B'>lcd</emphasis>
51 to move into that directory, otherwise a directory tree that resembles
52 the backed up filesystem will be created in the current directory.
53 See the examples below for details.</para>
55 <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>
58 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
59 man page for more details about &A;.</para>
62 <refsect1><title>OPTIONS</title>
63 <note><para>The Default values are those set at compile-time.
64 Use <command>amrestore</command> to recover client-encrypted or
65 client-custom-compressed tapes.</para>
67 <variablelist remap='TP'>
69 <term><emphasis remap='B'>[ -C ] config</emphasis></term>
71 <para>&A; configuration.</para>
75 <term><option>-s index-server</option></term>
77 <para>Host that runs the index daemon.</para>
81 <term><option>-t tape-server</option></term>
83 <para>Host that runs the tape server daemon.</para>
87 <term><option>-d tape-device</option></term>
89 <para>Tape device to use on the tape server host.</para>
94 <term><emphasis remap='B'>-o</emphasis> <replaceable>clientconfigoption</replaceable></term>
96 <para>See the "<emphasis remap='B'>CONFIGURATION OVERRIDE</emphasis>"
97 section in <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
104 <refsect1><title>COMMANDS</title>
105 <para><emphasis remap='B'>Amrecover</emphasis>
106 connects to the index server and then presents a command line prompt.
107 Usage is similar to an ftp client.
108 The GNU readline library is used to provide command line history and editing
109 if it was built in to
110 <command>amrecover</command>.</para>
112 <para>The purpose of browsing the database is to build up a
113 <emphasis remap='I'>restore list</emphasis>
114 of files to be extracted from the backup system.
115 The following commands are available:</para>
116 <variablelist remap='TP'>
118 <term><emphasis remap='B'>sethost hostname</emphasis></term>
120 <para>Specifies which host to look at backup files for (default: the local host).</para>
124 <term><emphasis remap='B'>setdate YYYY-MM-DD-HH-MM[-SS] | YYYY-MM-DD</emphasis></term>
126 <para>Set the restore time (default: now).
127 File listing commands only return information on
128 backup images for this day,
129 for the day before with the next lower dump level,
131 until the most recent level 0 backup on or before
132 the specified date is encountered.</para>
134 <para>For example, if:</para>
137 <literallayout remap='.nf'>
138 1996-07-01 was a level 0 backup
139 1996-07-02 through 1996-07-05 were level 1 backups
140 1996-07-06 through 1997-07-08 were level 2 backups
141 </literallayout> <!-- .fi -->
143 <para>then the command <emphasis remap='B'>setdate 1997-07-08-00</emphasis>
144 would yield files from the following days:</para>
147 <literallayout remap='.nf'>
148 1997-07-08 (the latest level 2 backup)
149 1997-07-05 (the latest level 1 backup)
150 1997-07-01 (the latest level 0 backup)
151 </literallayout> <!-- .fi -->
153 <para>Only the most recent version of a file will be presented.</para>
155 <para>The following abbreviated date specifications are accepted:</para>
157 <variablelist remap='TP'>
159 <term><option>--MM-DD</option></term>
161 <para>dates in the current year</para>
165 <term><option>---DD</option></term>
167 <para>dates in the current month of the current year</para>
175 <variablelist remap='TP'>
177 <term><emphasis remap='B'>setdisk</emphasis> <emphasis remap='I'>diskname</emphasis> [<emphasis remap='I'>mountpoint</emphasis>]</term>
179 <para>Specifies which disk to consider
180 (default: the disk holding the working directory where
181 <command>amrecover</command>
183 It can only be set after the host is set with
184 <emphasis remap='B'>sethost</emphasis>.
185 <emphasis remap='I'>Diskname</emphasis>
186 is the device name specified in the
187 <emphasis remap='I'>amanda.conf</emphasis>
189 The disk must be local to the host.
191 <emphasis remap='I'>mountpoint</emphasis>
192 is not specified, all pathnames will be relative to the (unknown)
193 mount point instead of full pathnames.</para>
197 <term><emphasis remap='B'>listhost</emphasis> [<emphasis remap='I'>diskdevice</emphasis>]</term>
200 <emphasis remap='B'>host</emphasis></para>
204 <term><emphasis remap='B'>listdisk</emphasis> [<emphasis remap='I'>diskdevice</emphasis>]</term>
207 <emphasis remap='B'>diskname</emphasis></para>
211 <term><emphasis remap='B'>setdevice</emphasis> [[-h <emphasis remap='I'>tape-server</emphasis>] <emphasis remap='I'>tapedev</emphasis>]</term>
213 <para>Specifies the host to use as the tape server, and which of its tape devices to use.
214 If the server is omitted, the server name reverts to the configure-time default.
215 If the tape device is omitted, the default is used.</para>
217 <para>If you want amrecover to use your changer, the
218 <emphasis remap='I'>tapedev</emphasis>
219 must be equal to the amrecover_changer setting on the server.</para>
221 <para>Since device names contain colons, you must always specify the hostname.</para>
224 settape 192.168.0.10:file:/file1
226 <para>You can change the tape device when amrecover ask you to load the tape:</para>
231 Tape device: server2:/dev/nst2
233 Using tape /dev/nst2 from server server2.
240 <variablelist remap='TP'>
242 <term><emphasis remap='B'>setmode</emphasis> <emphasis remap='I'>mode</emphasis></term>
244 <para>Set the extraction mode for Samba shares.
246 <emphasis remap='I'>mode</emphasis>
248 <emphasis remap='B'>smb</emphasis>,
249 shares are sent to the Samba server
250 to be restored back onto the PC.
252 <emphasis remap='I'>mode</emphasis>
254 <emphasis remap='B'>tar</emphasis>,
255 they are extracted on the local machine the same way tar volumes are extracted.</para>
259 <term><emphasis remap='B'>mode</emphasis></term>
261 <para>Displays the extracting mode for Samba shares.</para>
265 <term><emphasis remap='B'>history</emphasis></term>
267 <para>Show the backup history of the current host and disk.
268 Dates, levels, tapes and file position on tape of each backup are displayed.</para>
272 <term><emphasis remap='B'>pwd</emphasis></term>
274 <para>Display the name of the current backup working directory.</para>
278 <term><emphasis remap='B'>cd</emphasis> <emphasis remap='I'>dir</emphasis></term>
280 <para>Change the backup working directory to
281 <emphasis remap='I'>dir.</emphasis>
282 If the mount point was specified with
283 <emphasis remap='B'>setdisk</emphasis>,
284 this can be a full pathname or it can be
285 relative to the current backup working directory.
286 If the mount point was not specified,
287 paths are relative to the mount point if they start with "/",
288 otherwise they are relative to the current backup working directory.
290 <emphasis remap='I'>dir</emphasis>
291 can be a shell style wildcards.</para>
295 <term><emphasis remap='B'>cdx</emphasis> <emphasis remap='I'>dir</emphasis></term>
298 <emphasis remap='B'>cd</emphasis>
299 command but allow regular expression.</para>
303 <term><emphasis remap='B'>lpwd</emphasis></term>
306 <command>amrecover</command>
308 Files will be restored under this directory,
309 relative to the backed up filesystem.</para>
313 <term><emphasis remap='B'>lcd</emphasis> <emphasis remap='I'>path</emphasis></term>
316 <command>amrecover</command>
318 <emphasis remap='I'>path</emphasis>.</para>
322 <term><emphasis remap='B'>ls</emphasis></term>
324 <para>List the contents of the current backup working directory.
325 See the description of the
326 <emphasis remap='B'>setdate</emphasis>
327 command for how the view of the
328 directory is built up.
329 The backup date is shown for each file.</para>
333 <term><emphasis remap='B'>add</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
335 <para>Add the specified files or directories to the restore list.
336 Each item may have shell style wildcards.</para>
340 <term><emphasis remap='B'>addx</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
342 <para>Add the specified files or directories to the restore list.
343 Each item may be a regular expression.</para>
347 <term><emphasis remap='B'>delete</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
349 <para>Delete the specified files or directories from the restore list.
350 Each item may have shell style wildcards.</para>
354 <term><emphasis remap='B'>deletex</emphasis> <emphasis remap='I'>item1 item2 ...</emphasis></term>
356 <para>Delete the specified files or directories from the restore list.
357 Each item may be a regular expression.</para>
361 <term><emphasis remap='B'>list</emphasis> <emphasis remap='I'>file</emphasis></term>
363 <para>Display the contents of the restore list.
364 If a file name is specified,
365 the restore list is written to that file.
366 This can be used to manually extract the files from the &A; tapes with
367 <emphasis remap='B'>amrestore</emphasis>.</para>
371 <term><emphasis remap='B'>clear</emphasis></term>
373 <para>Clear the restore list.</para>
377 <term><emphasis remap='B'>quit</emphasis></term>
379 <para>Close the connection to the index server and exit.</para>
383 <term><emphasis remap='B'>exit</emphasis></term>
385 <para>Close the connection to the index server and exit.</para>
389 <term><emphasis remap='B'>extract</emphasis></term>
391 <para>Start the extract sequence (see the examples below). Make sure the
392 local working directory is the root of the backed up filesystem, or
393 another directory that will behave like that. Use
394 <emphasis remap='B'>lpwd</emphasis>
395 to display the local working directory, and
396 <emphasis remap='B'>lcd</emphasis>
401 <term><emphasis remap='B'>help</emphasis></term>
403 <para>Display a brief list of these commands.</para>
409 <refsect1><title>EXAMPLES</title>
410 <para>The following shows the recovery of an old
411 <emphasis remap='I'>syslog</emphasis>
417 syslog.7: No such file or directory
419 AMRECOVER Version 2.4.2. Contacting server on oops ...
420 220 oops &A; index server (2.4.2) ready.
421 Setting restore date to today (1997-12-09)
422 200 Working date set to 1997-12-09.
423 200 Config set to MyConfig.
424 200 Dump host set to this-host.some.org.
425 $CWD '/var/log' is on disk '/var' mounted at '/var'.
426 200 Disk set to /var.
428 WARNING: not on root of selected filesystem, check man-page!
430 1997-12-09 daemon.log
433 1997-12-08 sysidconfig.log
442 amrecover> add syslog.7
448 amrecover> extract
450 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
452 The following tapes are needed: DMP014
454 Restoring files into directory /var
459 set owner/mode for '.'? [yn] n
464 -rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
467 <para>If you do not want to overwrite existing files,
468 create a subdirectory to run
469 <command>amrecover</command>
470 from and then move the restored files afterward.</para>
474 # (umask 077 ; mkdir .restore)
477 AMRECOVER Version 2.4.2. Contacting server on oops ...
483 amrecover> add syslog.7
487 amrecover> extract
489 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
493 # mv -i log/syslog.7 ../log/syslog.7-restored
498 <para>If you need to run
499 <emphasis remap='B'>amrestore</emphasis>
500 by hand instead of letting
501 <command>amrecover</command>
504 <emphasis remap='B'>list</emphasis>
505 command after browsing to display the needed tapes.</para>
510 AMRECOVER Version 2.4.2. Contacting server on oops ...
514 amrecover> add syslog syslog.6 syslog.7
519 TAPE DMP014 LEVEL 0 DATE 1997-12-08
522 TAPE DMP015 LEVEL 1 DATE 1997-12-09
528 <emphasis remap='B'>history</emphasis>
529 command shows each tape that has a backup of the
530 current disk along with the date of the backup,
533 and the file position on the tape.
534 All active tapes are listed, not just back to
535 the most recent full dump.</para>
537 <para>Tape file position zero is a label.
538 The first backup image is in file position one.</para>
543 AMRECOVER Version 2.4.2. Contacting server on oops ...
545 amrecover> history
546 200- Dump history for config "MyConfig" host "this-host.some.org" disk "/var"
547 201- 1997-12-09 1 DMP015 9
548 201- 1997-12-08 1 DMP014 11
549 201- 1997-12-07 0 DMP013 22
550 201- 1997-12-06 1 DMP012 16
551 201- 1997-12-05 1 DMP011 9
552 201- 1997-12-04 0 DMP010 11
553 201- 1997-12-03 1 DMP009 7
554 201- 1997-12-02 1 DMP008 7
555 201- 1997-12-01 1 DMP007 9
556 201- 1997-11-30 1 DMP006 6
562 <refsect1><title>ENVIRONMENT</title>
563 <para><envar>PAGER</envar>
566 <emphasis remap='B'>ls</emphasis>
568 <emphasis remap='B'>list</emphasis>
569 commands will use $PAGER to display the file lists.
571 <emphasis remap='I'>more</emphasis>
572 if PAGER is not set.</para>
573 <para><envar>AMANDA_SERVER</envar>
574 If set, $AMANDA_SERVER will be used as index-server.
575 The value will take precedence over the compiled default,
576 but will be overridden by the -s switch.
578 <para><envar>AMANDA_TAPE_SERVER</envar>
579 If set, $AMANDA_TAPE_SERVER will be used as tape-server.
580 The value will take precedence over the compiled default,
581 but will be overridden by the -t switch.
586 <refsect1><title>SEE ALSO</title>
587 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
588 <citerefentry><refentrytitle>amanda-client.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
589 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
590 <citerefentry><refentrytitle>amfetchdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
591 <citerefentry><refentrytitle>readline</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
592 <ulink url="http://wiki.zmanda.com"/>