3 Prev Chapter 35. 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-
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 See the amanda(8) man page for more details about AMANDA.
31 The listed defaults map to the values you ran the configure-script with.
35 AMANDA configuration (default: daily).
38 Host that runs the index daemon (default: oops).
41 Host that runs the tape server daemon (default: 192.168.0.10).
44 Tape device to use on the tape server host (default: /dev/nst0).
49 Amrecover connects to the index server and then presents a command line prompt.
50 Usage is similar to an ftp client. The GNU readline library is used to provide
51 command line history and editing if it was built in to amrecover.
52 The purpose of browsing the database is to build up a restore list of files to
53 be extracted from the backup system. The following commands are available:
57 Specifies which host to look at backup files for (default: the local
61 Set the date (default: today). File listing commands only return
62 information on backup images for this day, for the day before with the
63 next lower dump level, and so on, until the most recent level 0 backup on
64 or before the specified date is encountered.
67 1996-07-01 was a level 0 backup
68 1996-07-02 through 1996-07-05 were level 1 backups
69 1996-07-06 through 1997-07-08 were level 2 backups
70 then if 1997-07-08 is the requested date, files from the following days
73 1997-07-08 (the latest level 2 backup)
74 1997-07-05 (the latest level 1 backup)
75 1997-07-01 (the latest level 0 backup)
76 Only the most recent version of a file will be presented.
77 The following abbreviated date specifications are accepted:
81 dates in the current year
84 dates in the current month of the current year
89 setdisk diskname mountpoint
90 Specifies which disk to consider (default: the disk holding the working
91 directory where amrecover is started). It can only be set after the host
92 is set with sethost. Diskname is the device name specified in the
93 amanda.conf or disklist configuration file. The disk must be local to the
94 host. If mountpoint is not specified, all pathnames will be relative to
95 the (unknown) mount point instead of full pathnames.
100 settape [[server]:][tapedev|default]
101 Specifies the host to use as the tape server, and which of its tape
102 devices to use. If the server is omitted, but the colon is not, the
103 server name reverts to 192.168.0.10, the configure-time default. If the
104 tape device is omitted, it remains unchanged. To use the default tape
105 device selected by the tape server, the word default must be specified.
106 If no argument is specified, or the argument is an empty string, no
107 changes occur, and the current settings are displayed.
108 If you want amrecover to use your changer, the tapedev must be equal to
109 the amrecover_changer setting on the server.
110 If you need to change the protocol (tape:, rait:, file:, null:) then you
111 must specify the hostname.
113 settape 192.168.0.10:file:/file1
115 You can change the tape device when amrecover ask you to load the tape:
119 Tape device: server2:/dev/nst2
121 Using tape /dev/nst2 from server server2.
127 Set the extraction mode for Samba shares. If mode is smb, shares are sent
128 to the Samba server to be restored back onto the PC. If mode is tar, they
129 are extracted on the local machine the same way tar volumes are
133 Displays the extracting mode for Samba shares.
136 Show the backup history of the current host and disk. Dates, levels,
137 tapes and file position on tape of each backup are displayed.
140 Display the name of the current backup working directory.
143 Change the backup working directory to dir. If the mount point was
144 specified with setdisk, this can be a full pathname or it can be relative
145 to the current backup working directory. If the mount point was not
146 specified, paths are relative to the mount point if they start with "/",
147 otherwise they are relative to the current backup working directory. The
148 dir can be a shell style wildcards.
151 Like the cd command but allow regular expression.
154 Display the amrecover working directory. Files will be restored under
155 this directory, relative to the backed up filesystem.
158 Change the amrecover working directory to path.
161 List the contents of the current backup working directory. See the
162 description of the setdate command for how the view of the directory is
163 built up. The backup date is shown for each file.
166 Add the specified files or directories to the restore list. Each item may
167 have shell style wildcards.
170 Add the specified files or directories to the restore list. Each item may
171 be a regular expression.
173 delete item1 item2 ...
174 Delete the specified files or directories from the restore list. Each
175 item may have shell style wildcards.
177 deletex item1 item2 ...
178 Delete the specified files or directories from the restore list. Each
179 item may be a regular expression.
182 Display the contents of the restore list. If a file name is specified,
183 the restore list is written to that file. This can be used to manually
184 extract the files from the AMANDA tapes with amrestore.
187 Clear the restore list.
190 Close the connection to the index server and exit.
193 Close the connection to the index server and exit.
196 Start the extract sequence (see the examples below). Make sure the local
197 working directory is the root of the backed up filesystem, or another
198 directory that will behave like that. Use lpwd to display the local
199 working directory, and lcd to change it.
202 Display a brief list of these commands.
207 The following shows the recovery of an old syslog file.
211 syslog.7: No such file or directory
213 AMRECOVER Version 2.4.2. Contacting server on oops ...
214 220 oops AMANDA index server (2.4.2) ready.
215 Setting restore date to today (1997-12-09)
216 200 Working date set to 1997-12-09.
217 200 Config set to daily.
218 200 Dump host set to this-host.some.org.
219 $CWD '/var/log' is on disk '/var' mounted at '/var'.
220 200 Disk set to /var.
222 WARNING: not on root of selected filesystem, check man-page!
224 1997-12-09 daemon.log
227 1997-12-08 sysidconfig.log
236 amrecover> add syslog.7
244 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
246 The following tapes are needed: DMP014
248 Restoring files into directory /var
253 set owner/mode for '.'? [yn] n
258 -rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
260 If you do not want to overwrite existing files, create a subdirectory to run
261 amrecover from and then move the restored files afterward.
264 # (umask 077 ; mkdir .restore)
267 AMRECOVER Version 2.4.2. Contacting server on oops ...
273 amrecover> add syslog.7
279 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
283 # mv -i log/syslog.7 ../log/syslog.7-restored
287 If you need to run amrestore by hand instead of letting amrecover control it,
288 use the list command after browsing to display the needed tapes.
292 AMRECOVER Version 2.4.2. Contacting server on oops ...
296 amrecover> add syslog syslog.6 syslog.7
301 TAPE DMP014 LEVEL 0 DATE 1997-12-08
304 TAPE DMP015 LEVEL 1 DATE 1997-12-09
308 The history command shows each tape that has a backup of the current disk along
309 with the date of the backup, the level, the tape label and the file position on
310 the tape. All active tapes are listed, not just back to the most recent full
312 Tape file position zero is a label. The first backup image is in file position
317 AMRECOVER Version 2.4.2. Contacting server on oops ...
320 200- Dump history for config "daily" host "this-host.some.org" disk "/var"
321 201- 1997-12-09 1 DMP015 9
322 201- 1997-12-08 1 DMP014 11
323 201- 1997-12-07 0 DMP013 22
324 201- 1997-12-06 1 DMP012 16
325 201- 1997-12-05 1 DMP011 9
326 201- 1997-12-04 0 DMP010 11
327 201- 1997-12-03 1 DMP009 7
328 201- 1997-12-02 1 DMP008 7
329 201- 1997-12-01 1 DMP007 9
330 201- 1997-11-30 1 DMP006 6
337 PAGER The ls and list commands will use $PAGER to display the file lists.
338 Defaults to more if PAGER is not set.
342 Alan M. McIvor <alan@kauri.auck.irl.cri.nz> : Original text
343 Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
348 amanda(8), amrestore(8), readline(3)
349 -------------------------------------------------------------------------------