1AMRECOVER(8) System Administration Commands AMRECOVER(8)
2
3
4
6 amrecover - Amanda index database browser
7
9 amrecover [-s index-server] [-t tape-server] [-d tape-device]
10 [-h hostname] [-o configoption...] [-C config]
11
13 Amrecover browses the database of Amanda index files to determine which
14 tapes contain files to recover. Furthermore, it is able to recover
15 files.
16
17 In order to restore files in place, you must invoke amrecover from the
18 root of the backed up filesystem, or use lcd to move into that
19 directory, otherwise a directory tree that resembles the backed up
20 filesystem will be created in the current directory. See the examples
21 below for details.
22
23 Amrecover will read the amanda-client.conf file and the
24 config/amanda-client.conf file. If no configuration name is supplied on
25 the command line, Amrecover will try the compiled-in default
26 configuration ,usually DailySet1.
27
28 See the amanda(8) man page for more details about Amanda.
29
31 Note
32 The Default values are those set at compile-time. Use amrestore to
33 recover client-encrypted or client-custom-compressed tapes.
34
35 [ -C ] config
36 Amanda configuration.
37
38 -s index-server
39 Host that runs the index daemon.
40
41 -t tape-server
42 Host that runs the tape server daemon.
43
44 -d tape-device
45 Tape device to use on the tape server host.
46
47 -h hostname
48 Hostname to begin restoring; defaults to the system's hostname.
49
50 -o clientconfigoption
51 See the "CONFIGURATION OVERRIDE" section in amanda(8).
52
54 The default auth is 'BSDTCP', you can set a different auth in the
55 amanda-client.conf file or by specifying the '-oauth=bsd' command line
56 argument.
57
59 Amrecover connects to the index server and then presents a command line
60 prompt. Usage is similar to an ftp client. The GNU readline library is
61 used to provide command line history and editing if it was built in to
62 amrecover.
63
64 The purpose of browsing the database is to build up a restore list of
65 files to be extracted from the backup system. The following commands
66 are available:
67
68 sethost hostname
69 Specifies which host to look at backup files for (default: the
70 local host).
71
72 setdate YYYY-MM-DD-HH-MM[-SS] | YYYY-MM-DD
73 Set the restore time (default: now). File listing commands only
74 return information on backup images for this day, for the day
75 before with the next lower dump level, and so on, until the most
76 recent level 0 backup on or before the specified date is
77 encountered.
78
79 For example, if:
80
81 1996-07-01 was a level 0 backup
82 1996-07-02 through 1996-07-05 were level 1 backups
83 1996-07-06 through 1997-07-08 were level 2 backups
84
85 then the command setdate 1997-07-08-00 would yield files from the
86 following days:
87
88 1997-07-08 (the latest level 2 backup)
89 1997-07-05 (the latest level 1 backup)
90 1997-07-01 (the latest level 0 backup)
91
92 Only the most recent version of a file will be presented.
93
94 The following abbreviated date specifications are accepted:
95
96 --MM-DD
97 dates in the current year
98
99 ---DD
100 dates in the current month of the current year
101
102 setdisk diskname [mountpoint]
103 Specifies which disk to consider (default: the disk holding the
104 working directory where amrecover is started). It can only be set
105 after the host is set with sethost. Diskname is the device name
106 specified in the amanda.conf or disklist(5). The disk must be local
107 to the host. If mountpoint is not specified, all pathnames will be
108 relative to the (unknown) mount point instead of full pathnames.
109
110 listhost [diskdevice]
111 List all host
112
113 listdisk [diskdevice]
114 List all diskname
115
116 storage [storage-name]*
117 The name of the storage in order of preference, use 'HOLDING' for
118 the holding disk.
119
120 listproperty
121 List all property
122
123 setproperty [append] [priority] name [value ...]
124 Set the property name to the value value. The append keyword
125 appends the value to the values already set for this property.
126 Without value, the property is unset. The priority keyword is
127 unused, it is present for ease of copy/paste from application
128 definition.
129
130 setdevice [[-h tape-server] tapedev]
131 Specifies the host to use as the tape server, and which of its tape
132 devices to use. If the server is omitted, the server name reverts
133 to the configure-time default. If the tape device is omitted, the
134 default is used.
135
136 If you want amrecover to use your changer, the tapedev must be
137 equal to the amrecover-changer setting on the server.
138
139 Since device names contain colons, you must always specify the
140 hostname.
141 settape 192.168.0.10:file:/file1
142 You can change the tape device when amrecover ask you to load the
143 tape:
144 Load tape DMP014 now
145 Continue? [Y/n/t]: t
146 Tape device: server2:/dev/nst2
147 Continue? [Y/n/t]: Y
148 Using tape /dev/nst2 from server server2.
149
150 setmode mode
151 Set the extraction mode for Samba shares. If mode is smb, shares
152 are sent to the Samba server to be restored back onto the PC. If
153 mode is tar, they are extracted on the local machine the same way
154 tar volumes are extracted.
155
156 settranslate [on|off]
157 Default: on. Translate escaped octal value ('\000') in the index
158 file to their corespondig characters, it improve the interface if
159 amrecover is run in the same charset as the filename. Set it to off
160 if the charset of some filename is not compatible with the
161 amrecover charset.
162
163 mode
164 Displays the extracting mode for Samba shares.
165
166 history
167 Show the backup history of the current host and disk. Dates,
168 levels, tapes and file position on tape of each backup are
169 displayed.
170
171 pwd
172 Display the name of the current backup working directory.
173
174 cd dir
175 Change the backup working directory to dir. If the mount point was
176 specified with setdisk, this can be a full pathname or it can be
177 relative to the current backup working directory. If the mount
178 point was not specified, paths are relative to the mount point if
179 they start with "/", otherwise they are relative to the current
180 backup working directory. The dir can be a shell style wildcards.
181
182 cdx dir
183 Like the cd command but allow regular expression.
184
185 lpwd
186 Display the amrecover working directory. Files will be restored
187 under this directory, relative to the backed up filesystem.
188
189 lcd path
190 Change the amrecover working directory to path.
191
192 ls
193 List the contents of the current backup working directory. See the
194 description of the setdate command for how the view of the
195 directory is built up. The backup date is shown for each file.
196
197 add item1 item2 ...
198 Add the specified files or directories to the restore list. Each
199 item may have shell style wildcards.
200
201 addx item1 item2 ...
202 Add the specified files or directories to the restore list. Each
203 item may be a regular expression.
204
205 delete item1 item2 ...
206 Delete the specified files or directories from the restore list.
207 Each item may have shell style wildcards.
208
209 deletex item1 item2 ...
210 Delete the specified files or directories from the restore list.
211 Each item may be a regular expression.
212
213 list file
214 Display the contents of the restore list. If a file name is
215 specified, the restore list is written to that file. This can be
216 used to manually extract the files from the Amanda tapes with
217 amrestore.
218
219 clear
220 Clear the restore list.
221
222 quit
223 Close the connection to the index server and exit.
224
225 exit
226 Close the connection to the index server and exit.
227
228 extract
229 Start the extract sequence (see the examples below). Make sure the
230 local working directory is the root of the backed up filesystem, or
231 another directory that will behave like that. Use lpwd to display
232 the local working directory, and lcd to change it.
233
234 help
235 Display a brief list of these commands.
236
238 The following shows the recovery of an old syslog file.
239 # cd /var/log
240 # ls -l syslog.7
241 syslog.7: No such file or directory
242 # amrecover MyConfig
243 AMRECOVER Version 2.4.2. Contacting server on oops ...
244 220 oops Amanda index server (2.4.2) ready.
245 Setting restore date to today (1997-12-09)
246 200 Working date set to 1997-12-09.
247 200 Config set to MyConfig.
248 200 Dump host set to this-host.some.org.
249 $CWD '/var/log' is on disk '/var' mounted at '/var'.
250 200 Disk set to /var.
251 /var/log
252 WARNING: not on root of selected filesystem, check man-page!
253 amrecover> ls
254 1997-12-09 daemon.log
255 1997-12-09 syslog
256 1997-12-08 authlog
257 1997-12-08 sysidconfig.log
258 1997-12-08 syslog.0
259 1997-12-08 syslog.1
260 1997-12-08 syslog.2
261 1997-12-08 syslog.3
262 1997-12-08 syslog.4
263 1997-12-08 syslog.5
264 1997-12-08 syslog.6
265 1997-12-08 syslog.7
266 amrecover> add syslog.7
267 Added /log/syslog.7
268 amrecover> lpwd
269 /var/log
270 amrecover> lcd ..
271 /var
272 amrecover> extract
273
274 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
275
276 The following tapes are needed: DMP014
277
278 Restoring files into directory /var
279 Continue? [Y/n]: y
280
281 Load tape DMP014 now
282 Continue? [Y/n/t]: y
283 set owner/mode for '.'? [yn] n
284 amrecover> quit
285 200 Good bye.
286 # ls -l syslog.7
287 total 26
288 -rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
289
290 If you do not want to overwrite existing files, create a subdirectory
291 to run amrecover from and then move the restored files afterward.
292 # cd /var
293 # (umask 077 ; mkdir .restore)
294 # cd .restore
295 # amrecover
296 AMRECOVER Version 2.4.2. Contacting server on oops ...
297 ...
298 amrecover> cd log
299 /var/log
300 amrecover> ls
301 ...
302 amrecover> add syslog.7
303 Added /log/syslog.7
304 amrecover> lpwd
305 /var/.restore
306 amrecover> extract
307
308 Extracting files using tape drive /dev/nst0 on host 192.168.0.10
309 ...
310 amrecover> quit
311 200 Good bye.
312 # mv -i log/syslog.7 ../log/syslog.7-restored
313 # cd ..
314 # rm -fr .restore
315
316 If you need to run amrestore by hand instead of letting amrecover
317 control it, use the list command after browsing to display the needed
318 tapes.
319 # cd /var/log
320 # amrecover
321 AMRECOVER Version 2.4.2. Contacting server on oops ...
322 ...
323 amrecover> ls
324 ...
325 amrecover> add syslog syslog.6 syslog.7
326 Added /log/syslog
327 Added /log/syslog.6
328 Added /log/syslog.7
329 amrecover> list
330 TAPE DMP014 LEVEL 0 DATE 1997-12-08
331 /log/syslog.7
332 /log/syslog.6
333 TAPE DMP015 LEVEL 1 DATE 1997-12-09
334 /log/syslog
335 amrecover> quit
336
337 The history command shows each tape that has a backup of the current
338 disk along with the date of the backup, the level, the tape label and
339 the file position on the tape. All active tapes are listed, not just
340 back to the most recent full dump.
341
342 Tape file position zero is a label. The first backup image is in file
343 position one.
344 # cd /var/log
345 # amrecover
346 AMRECOVER Version 2.4.2. Contacting server on oops ...
347 ...
348 amrecover> history
349 200- Dump history for config "MyConfig" host "this-host.some.org" disk "/var"
350 201- 1997-12-09 1 DMP015 9
351 201- 1997-12-08 1 DMP014 11
352 201- 1997-12-07 0 DMP013 22
353 201- 1997-12-06 1 DMP012 16
354 201- 1997-12-05 1 DMP011 9
355 201- 1997-12-04 0 DMP010 11
356 201- 1997-12-03 1 DMP009 7
357 201- 1997-12-02 1 DMP008 7
358 201- 1997-12-01 1 DMP007 9
359 201- 1997-11-30 1 DMP006 6
360 ...
361 amrecover> quit
362
364 PAGERThe ls and list commands will use $PAGER to display the file
365 lists. Defaults to more if PAGER is not set.
366
367 AMANDA_SERVER If set, $AMANDA_SERVER will be used as index-server. The
368 value will take precedence over the compiled default, but will be
369 overridden by the -s switch.
370
371 AMANDA_TAPE_SERVER If set, $AMANDA_TAPE_SERVER will be used as
372 tape-server. The value will take precedence over the compiled default,
373 but will be overridden by the -t switch.
374
376 amanda(8), amanda-client.conf(5), amrestore(8), amfetchdump(8),
377 readline(3)
378
379 The Amanda Wiki: : http://wiki.zmanda.com/
380
382 Alan M. McIvor <alan@kauri.auck.irl.cri.nz>
383
384 Stefan G. Weichinger <sgw@amanda.org>
385
386
387
388Amanda 3.5.1 12/01/2017 AMRECOVER(8)