3 Prev Chapter 36. The Amanda Manual Pages. Next
5 -------------------------------------------------------------------------------
9 amrecover
\14 Amanda index database browser
13 amrecover [-C config] [-s index-server] [-t tape-server] [-d tape-device] [ -
18 Amrecover browses the database of Amanda index files to determine which tapes
19 contain files to recover. Furthermore, it is able to recover files.
20 In order to restore files in place, you must invoke amrecover from the root of
21 the backed up filesystem, or use lcd to move into that directory, otherwise a
22 directory tree that resembles the backed up filesystem will be created in the
23 current directory. See the examples below for details.
24 Amrecover will read the amanda-client.conf file and the config/amanda-
26 See the amanda(8) man page for more details about Amanda.
33 The Default values are those set at compile-time. Use amrestore to recover
34 client-encrypted or client-custom-compressed tapes.
41 Host that runs the index daemon.
44 Host that runs the tape server daemon.
47 Tape device to use on the tape server host.
50 See the "CONFIGURATION OVERRIDE" section in amanda(8).
55 Amrecover connects to the index server and then presents a command line prompt.
56 Usage is similar to an ftp client. The GNU readline library is used to provide
57 command line history and editing if it was built in to amrecover.
58 The purpose of browsing the database is to build up a restore list of files to
59 be extracted from the backup system. The following commands are available:
63 Specifies which host to look at backup files for (default: the local
66 setdate YYYY-MM-DD-HH-MM[-SS] | YYYY-MM-DD
67 Set the restore time (default: now). File listing commands only return
68 information on backup images for this day, for the day before with the
69 next lower dump level, and so on, until the most recent level 0 backup on
70 or before the specified date is encountered.
73 1996-07-01 was a level 0 backup
74 1996-07-02 through 1996-07-05 were level 1 backups
75 1996-07-06 through 1997-07-08 were level 2 backups
76 then the command setdate 1997-07-08-00 would yield files from the
79 1997-07-08 (the latest level 2 backup)
80 1997-07-05 (the latest level 1 backup)
81 1997-07-01 (the latest level 0 backup)
82 Only the most recent version of a file will be presented.
83 The following abbreviated date specifications are accepted:
87 dates in the current year
90 dates in the current month of the current year
95 setdisk diskname [mountpoint]
96 Specifies which disk to consider (default: the disk holding the working
97 directory where amrecover is started). It can only be set after the host
98 is set with sethost. Diskname is the device name specified in the
99 amanda.conf or disklist configuration file. The disk must be local to the
100 host. If mountpoint is not specified, all pathnames will be relative to
101 the (unknown) mount point instead of full pathnames.
103 listhost [diskdevice]
106 listdisk [diskdevice]
109 settape [[server]:][tapedev|default]
110 Specifies the host to use as the tape server, and which of its tape
111 devices to use. If the server is omitted, but the colon is not, the
112 server name reverts to the configure-time default. If the tape device is
113 omitted, it remains unchanged. To use the default tape device selected by
114 the tape server, the word default must be specified. If no argument is
115 specified, or the argument is an empty string, no changes occur, and the
116 current settings are displayed.
117 If you want amrecover to use your changer, the tapedev must be equal to
118 the amrecover_changer setting on the server.
119 If you need to change the protocol (tape:, rait:, file:, null:) then you
120 must specify the hostname.
122 settape 192.168.0.10:file:/file1
124 You can change the tape device when amrecover ask you to load the tape:
128 Tape device: server2:/dev/nst2
130 Using tape /dev/nst2 from server server2.
136 Set the extraction mode for Samba shares. If mode is smb, shares are sent
137 to the Samba server to be restored back onto the PC. If mode is tar, they
138 are extracted on the local machine the same way tar volumes are
142 Displays the extracting mode for Samba shares.
145 Show the backup history of the current host and disk. Dates, levels,
146 tapes and file position on tape of each backup are displayed.
149 Display the name of the current backup working directory.
152 Change the backup working directory to dir. If the mount point was
153 specified with setdisk, this can be a full pathname or it can be relative
154 to the current backup working directory. If the mount point was not
155 specified, paths are relative to the mount point if they start with "/",
156 otherwise they are relative to the current backup working directory. The
157 dir can be a shell style wildcards.
160 Like the cd command but allow regular expression.
163 Display the amrecover working directory. Files will be restored under
164 this directory, relative to the backed up filesystem.
167 Change the amrecover working directory to path.
170 List the contents of the current backup working directory. See the
171 description of the setdate command for how the view of the directory is
172 built up. The backup date is shown for each file.
175 Add the specified files or directories to the restore list. Each item may
176 have shell style wildcards.
179 Add the specified files or directories to the restore list. Each item may
180 be a regular expression.
182 delete item1 item2 ...
183 Delete the specified files or directories from the restore list. Each
184 item may have shell style wildcards.
186 deletex item1 item2 ...
187 Delete the specified files or directories from the restore list. Each
188 item may be a regular expression.
191 Display the contents of the restore list. If a file name is specified,
192 the restore list is written to that file. This can be used to manually
193 extract the files from the Amanda tapes with amrestore.
196 Clear the restore list.
199 Close the connection to the index server and exit.
202 Close the connection to the index server and exit.
205 Start the extract sequence (see the examples below). Make sure the local
206 working directory is the root of the backed up filesystem, or another
207 directory that will behave like that. Use lpwd to display the local
208 working directory, and lcd to change it.
211 Display a brief list of these commands.
216 The following shows the recovery of an old syslog file.
220 syslog.7: No such file or directory
222 AMRECOVER Version 2.4.2. Contacting server on oops ...
223 220 oops Amanda index server (2.4.2) ready.
224 Setting restore date to today (1997-12-09)
225 200 Working date set to 1997-12-09.
226 200 Config set to daily.
227 200 Dump host set to this-host.some.org.
228 $CWD '/var/log' is on disk '/var' mounted at '/var'.
229 200 Disk set to /var.
231 WARNING: not on root of selected filesystem, check man-page!
233 1997-12-09 daemon.log
236 1997-12-08 sysidconfig.log
245 amrecover> add syslog.7
253 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
255 The following tapes are needed: DMP014
257 Restoring files into directory /var
262 set owner/mode for '.'? [yn] n
267 -rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
269 If you do not want to overwrite existing files, create a subdirectory to run
270 amrecover from and then move the restored files afterward.
273 # (umask 077 ; mkdir .restore)
276 AMRECOVER Version 2.4.2. Contacting server on oops ...
282 amrecover> add syslog.7
288 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
292 # mv -i log/syslog.7 ../log/syslog.7-restored
296 If you need to run amrestore by hand instead of letting amrecover control it,
297 use the list command after browsing to display the needed tapes.
301 AMRECOVER Version 2.4.2. Contacting server on oops ...
305 amrecover> add syslog syslog.6 syslog.7
310 TAPE DMP014 LEVEL 0 DATE 1997-12-08
313 TAPE DMP015 LEVEL 1 DATE 1997-12-09
317 The history command shows each tape that has a backup of the current disk along
318 with the date of the backup, the level, the tape label and the file position on
319 the tape. All active tapes are listed, not just back to the most recent full
321 Tape file position zero is a label. The first backup image is in file position
326 AMRECOVER Version 2.4.2. Contacting server on oops ...
329 200- Dump history for config "daily" host "this-host.some.org" disk "/var"
330 201- 1997-12-09 1 DMP015 9
331 201- 1997-12-08 1 DMP014 11
332 201- 1997-12-07 0 DMP013 22
333 201- 1997-12-06 1 DMP012 16
334 201- 1997-12-05 1 DMP011 9
335 201- 1997-12-04 0 DMP010 11
336 201- 1997-12-03 1 DMP009 7
337 201- 1997-12-02 1 DMP008 7
338 201- 1997-12-01 1 DMP007 9
339 201- 1997-11-30 1 DMP006 6
346 PAGER The ls and list commands will use $PAGER to display the file lists.
347 Defaults to more if PAGER is not set.
348 AMANDA_SERVER If set, $AMANDA_SERVER will be used as index-server. The value
349 will take precedence over the compiled default, but will be overridden by the -
351 AMANDA_TAPE_SERVER If set, $AMANDA_TAPE_SERVER will be used as tape-server. The
352 value will take precedence over the compiled default, but will be overridden by
357 Alan M. McIvor <alan@kauri.auck.irl.cri.nz> : Original text
358 Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the Amanda-documentation:
363 amanda(8), amanda-client.conf(5), amrestore(8), amfetchdump(8), readline(3)
364 -------------------------------------------------------------------------------