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'><arg choice='opt'>-C </arg><arg choice='plain'><replaceable>config</replaceable></arg></arg>
27 <arg choice='opt'><arg choice='plain'>-s </arg><arg choice='plain'><replaceable>index-server</replaceable></arg></arg>
28 <arg choice='opt'><arg choice='plain'>-t </arg><arg choice='plain'><replaceable>tape-server</replaceable></arg></arg>
29 <arg choice='opt'><arg choice='plain'>-d </arg><arg choice='plain'><replaceable>tape-device</replaceable></arg></arg>
34 <refsect1><title>DESCRIPTION</title>
35 <para><emphasis remap='B'>Amrecover</emphasis>
36 browses the database of &A; index files to determine which tapes
37 contain files to recover. Furthermore, it is able to recover files.</para>
39 <para>In order to restore files in place, you must invoke
40 <command>amrecover</command>
41 from the root of the backed up filesystem, or use
42 <emphasis remap='B'>lcd</emphasis>
43 to move into that directory, otherwise a directory tree that resembles
44 the backed up filesystem will be created in the current directory.
45 See the examples below for details.</para>
48 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
49 man page for more details about &A;.</para>
52 <refsect1><title>OPTIONS</title>
53 <note>The Default values are those set at compile-time.
54 Use <command>amrestore</command> to recover client-encrypted or
55 client-custom-compressed tapes.</note>
56 <variablelist remap='TP'>
58 <term><emphasis remap='B'>[ -C ] config</emphasis></term>
60 <para>&A; configuration.</para>
64 <term><option>-s index-server</option></term>
66 <para>Host that runs the index daemon.</para>
70 <term><option>-t tape-server</option></term>
72 <para>Host that runs the tape server daemon.</para>
76 <term><option>-d tape-device</option></term>
78 <para>Tape device to use on the tape server host.</para>
84 <refsect1><title>COMMANDS</title>
85 <para><emphasis remap='B'>Amrecover</emphasis>
86 connects to the index server and then presents a command line prompt.
87 Usage is similar to an ftp client.
88 The GNU readline library is used to provide command line history and editing
90 <command>amrecover</command>.</para>
92 <para>The purpose of browsing the database is to build up a
93 <emphasis remap='I'>restore list</emphasis>
94 of files to be extracted from the backup system.
95 The following commands are available:</para>
96 <variablelist remap='TP'>
98 <term><emphasis remap='B'>sethost hostname</emphasis></term>
100 <para>Specifies which host to look at backup files for (default: the local host).</para>
104 <term><emphasis remap='B'>setdate YYYY-MM-DD</emphasis></term>
106 <para>Set the date (default: today).
107 File listing commands only return information on
108 backup images for this day,
109 for the day before with the next lower dump level,
111 until the most recent level 0 backup on or before
112 the specified date is encountered.</para>
114 <para>For example, if:</para>
117 <literallayout remap='.nf'>
118 1996-07-01 was a level 0 backup
119 1996-07-02 through 1996-07-05 were level 1 backups
120 1996-07-06 through 1997-07-08 were level 2 backups
121 </literallayout> <!-- .fi -->
123 <para>then if 1997-07-08 is the requested date,
124 files from the following days would be used:</para>
127 <literallayout remap='.nf'>
128 1997-07-08 (the latest level 2 backup)
129 1997-07-05 (the latest level 1 backup)
130 1997-07-01 (the latest level 0 backup)
131 </literallayout> <!-- .fi -->
133 <para>Only the most recent version of a file will be presented.</para>
135 <para>The following abbreviated date specifications are accepted:</para>
137 <variablelist remap='TP'>
139 <term><option>--MM-DD</option></term>
141 <para>dates in the current year</para>
145 <term><option>---DD</option></term>
147 <para>dates in the current month of the current year</para>
155 <variablelist remap='TP'>
157 <term><emphasis remap='B'>setdisk <arg
158 choice='plain'><replaceable>diskname</replaceable></arg> <arg
159 choice='opt'><replaceable>mountpoint</replaceable></arg></emphasis></term>
161 <para>Specifies which disk to consider
162 (default: the disk holding the working directory where
163 <command>amrecover</command>
165 It can only be set after the host is set with
166 <emphasis remap='B'>sethost</emphasis>.
167 <emphasis remap='I'>Diskname</emphasis>
168 is the device name specified in the
169 <emphasis remap='I'>amanda.conf</emphasis>
171 <emphasis remap='I'>disklist</emphasis>
173 The disk must be local to the host.
175 <emphasis remap='I'>mountpoint</emphasis>
176 is not specified, all pathnames will be relative to the (unknown)
177 mount point instead of full pathnames.</para>
181 <term><emphasis remap='B'>listdisk [diskdevice]</emphasis></term>
184 <emphasis remap='B'>diskname</emphasis></para>
188 <term><emphasis remap='B'>settape [[server]:][tapedev|default]</emphasis></term>
190 <para>Specifies the host to use as the tape server, and which of its tape
192 If the server is omitted, but the colon is not, the
193 server name reverts to the configure-time
195 If the tape device is omitted, it remains unchanged.
196 To use the default tape device selected by the tape server, the word
197 <emphasis remap='I'>default</emphasis>
199 If no argument is specified, or the argument is an
200 empty string, no changes occur, and the current settings are
203 <para>If you want amrecover to use your changer, the
204 <emphasis remap='I'>tapedev</emphasis>
205 must be equal to the amrecover_changer setting on the server.</para>
207 <para>If you need to change the protocol (tape:, rait:, file:, null:) then you
208 must specify the hostname.</para>
211 settape 192.168.0.10:file:/file1
214 <para>You can change the tape device when amrecover ask you to load the tape:</para>
219 Tape device: server2:/dev/nst2
221 Using tape /dev/nst2 from server server2.
228 <variablelist remap='TP'>
230 <term><emphasis remap='B'>setmode mode</emphasis></term>
232 <para>Set the extraction mode for Samba shares.
234 <emphasis remap='I'>mode</emphasis>
236 <emphasis remap='B'>smb</emphasis>,
237 shares are sent to the Samba server
238 to be restored back onto the PC.
240 <emphasis remap='I'>mode</emphasis>
242 <emphasis remap='B'>tar</emphasis>,
243 they are extracted on the local machine the same way tar volumes are extracted.</para>
247 <term><emphasis remap='B'>mode</emphasis></term>
249 <para>Displays the extracting mode for Samba shares.</para>
253 <term><emphasis remap='B'>history</emphasis></term>
255 <para>Show the backup history of the current host and disk.
256 Dates, levels, tapes and file position on tape of each backup are displayed.</para>
260 <term><emphasis remap='B'>pwd</emphasis></term>
262 <para>Display the name of the current backup working directory.</para>
266 <term><emphasis remap='B'>cd dir</emphasis></term>
268 <para>Change the backup working directory to
269 <emphasis remap='I'>dir.</emphasis>
270 If the mount point was specified with
271 <emphasis remap='B'>setdisk</emphasis>,
272 this can be a full pathname or it can be
273 relative to the current backup working directory.
274 If the mount point was not specified,
275 paths are relative to the mount point if they start with "/",
276 otherwise they are relative to the current backup working directory.
278 <emphasis remap='I'>dir</emphasis>
279 can be a shell style wildcards.</para>
283 <term><emphasis remap='B'>cdx dir</emphasis></term>
286 <emphasis remap='B'>cd</emphasis>
287 command but allow regular expression.</para>
291 <term><emphasis remap='B'>lpwd</emphasis></term>
294 <command>amrecover</command>
296 Files will be restored under this directory,
297 relative to the backed up filesystem.</para>
301 <term><emphasis remap='B'>lcd path</emphasis></term>
304 <command>amrecover</command>
306 <emphasis remap='I'>path</emphasis>.</para>
310 <term><emphasis remap='B'>ls</emphasis></term>
312 <para>List the contents of the current backup working directory.
313 See the description of the
314 <emphasis remap='B'>setdate</emphasis>
315 command for how the view of the
316 directory is built up.
317 The backup date is shown for each file.</para>
321 <term><emphasis remap='B'>add item1 item2 ...</emphasis></term>
323 <para>Add the specified files or directories to the restore list.
324 Each item may have shell style wildcards.</para>
328 <term><emphasis remap='B'>addx item1 item2 ...</emphasis></term>
330 <para>Add the specified files or directories to the restore list.
331 Each item may be a regular expression.</para>
335 <term><emphasis remap='B'>delete item1 item2 ...</emphasis></term>
337 <para>Delete the specified files or directories from the restore list.
338 Each item may have shell style wildcards.</para>
342 <term><emphasis remap='B'>deletex item1 item2 ...</emphasis></term>
344 <para>Delete the specified files or directories from the restore list.
345 Each item may be a regular expression.</para>
349 <term><emphasis remap='B'>list file</emphasis></term>
351 <para>Display the contents of the restore list.
352 If a file name is specified,
353 the restore list is written to that file.
354 This can be used to manually extract the files from the &A; tapes with
355 <emphasis remap='B'>amrestore</emphasis>.</para>
359 <term><emphasis remap='B'>clear</emphasis></term>
361 <para>Clear the restore list.</para>
365 <term><emphasis remap='B'>quit</emphasis></term>
367 <para>Close the connection to the index server and exit.</para>
371 <term><emphasis remap='B'>exit</emphasis></term>
373 <para>Close the connection to the index server and exit.</para>
377 <term><emphasis remap='B'>extract</emphasis></term>
379 <para>Start the extract sequence (see the examples below). Make sure the
380 local working directory is the root of the backed up filesystem, or
381 another directory that will behave like that. Use
382 <emphasis remap='B'>lpwd</emphasis>
383 to display the local working directory, and
384 <emphasis remap='B'>lcd</emphasis>
389 <term><emphasis remap='B'>help</emphasis></term>
391 <para>Display a brief list of these commands.</para>
397 <refsect1><title>EXAMPLES</title>
398 <para>The following shows the recovery of an old
399 <emphasis remap='I'>syslog</emphasis>
405 syslog.7: No such file or directory
407 AMRECOVER Version 2.4.2. Contacting server on oops ...
408 220 oops &A; index server (2.4.2) ready.
409 Setting restore date to today (1997-12-09)
410 200 Working date set to 1997-12-09.
411 200 Config set to daily.
412 200 Dump host set to this-host.some.org.
413 $CWD '/var/log' is on disk '/var' mounted at '/var'.
414 200 Disk set to /var.
416 WARNING: not on root of selected filesystem, check man-page!
418 1997-12-09 daemon.log
421 1997-12-08 sysidconfig.log
430 amrecover> add syslog.7
436 amrecover> extract
438 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
440 The following tapes are needed: DMP014
442 Restoring files into directory /var
447 set owner/mode for '.'? [yn] n
452 -rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
455 <para>If you do not want to overwrite existing files,
456 create a subdirectory to run
457 <command>amrecover</command>
458 from and then move the restored files afterward.</para>
462 # (umask 077 ; mkdir .restore)
465 AMRECOVER Version 2.4.2. Contacting server on oops ...
471 amrecover> add syslog.7
475 amrecover> extract
477 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
481 # mv -i log/syslog.7 ../log/syslog.7-restored
486 <para>If you need to run
487 <emphasis remap='B'>amrestore</emphasis>
488 by hand instead of letting
489 <command>amrecover</command>
492 <emphasis remap='B'>list</emphasis>
493 command after browsing to display the needed tapes.</para>
498 AMRECOVER Version 2.4.2. Contacting server on oops ...
502 amrecover> add syslog syslog.6 syslog.7
507 TAPE DMP014 LEVEL 0 DATE 1997-12-08
510 TAPE DMP015 LEVEL 1 DATE 1997-12-09
516 <emphasis remap='B'>history</emphasis>
517 command shows each tape that has a backup of the
518 current disk along with the date of the backup,
521 and the file position on the tape.
522 All active tapes are listed, not just back to
523 the most recent full dump.</para>
525 <para>Tape file position zero is a label.
526 The first backup image is in file position one.</para>
531 AMRECOVER Version 2.4.2. Contacting server on oops ...
533 amrecover> history
534 200- Dump history for config "daily" host "this-host.some.org" disk "/var"
535 201- 1997-12-09 1 DMP015 9
536 201- 1997-12-08 1 DMP014 11
537 201- 1997-12-07 0 DMP013 22
538 201- 1997-12-06 1 DMP012 16
539 201- 1997-12-05 1 DMP011 9
540 201- 1997-12-04 0 DMP010 11
541 201- 1997-12-03 1 DMP009 7
542 201- 1997-12-02 1 DMP008 7
543 201- 1997-12-01 1 DMP007 9
544 201- 1997-11-30 1 DMP006 6
550 <refsect1><title>ENVIRONMENT</title>
551 <para><envar>PAGER</envar>
554 <emphasis remap='B'>ls</emphasis>
556 <emphasis remap='B'>list</emphasis>
557 commands will use $PAGER to display the file lists.
559 <emphasis remap='I'>more</emphasis>
560 if PAGER is not set.</para>
564 <refsect1><title>AUTHOR</title>
565 <para>Alan M. McIvor <email>alan@kauri.auck.irl.cri.nz</email> : Original text</para>
566 <para>&maintainer.sgw;: XML-conversion</para>
569 <refsect1><title>SEE ALSO</title>
570 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
571 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
572 <citerefentry><refentrytitle>amfetchdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
573 <citerefentry><refentrytitle>readline</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>