1AMRECOVER(8)            System Administration Commands            AMRECOVER(8)
2
3
4

NAME

6       amrecover - Amanda index database browser
7

SYNOPSIS

9       amrecover [-s index-server] [-t tape-server] [-d tape-device]
10                 [-h hostname] [-o configoption...] [-C config]
11

DESCRIPTION

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

OPTIONS

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

AUTH

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

COMMANDS

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       listproperty
117           List all property
118
119       setproperty [append] [priority] name [value ...]
120           Set the property name to the value value. The append keyword
121           appends the value to the values already set for this property.
122           Without value, the property is unset. The priority keyword is
123           unused, it is present for ease of copy/paste from application
124           definition.
125
126       setdevice [[-h tape-server] tapedev]
127           Specifies the host to use as the tape server, and which of its tape
128           devices to use. If the server is omitted, the server name reverts
129           to the configure-time default. If the tape device is omitted, the
130           default is used.
131
132           If you want amrecover to use your changer, the tapedev must be
133           equal to the amrecover-changer setting on the server.
134
135           Since device names contain colons, you must always specify the
136           hostname.
137           settape 192.168.0.10:file:/file1
138           You can change the tape device when amrecover ask you to load the
139           tape:
140           Load tape DMP014 now
141           Continue? [Y/n/t]: t
142           Tape device: server2:/dev/nst2
143           Continue? [Y/n/t]: Y
144           Using tape /dev/nst2 from server server2.
145
146       setmode mode
147           Set the extraction mode for Samba shares. If mode is smb, shares
148           are sent to the Samba server to be restored back onto the PC. If
149           mode is tar, they are extracted on the local machine the same way
150           tar volumes are extracted.
151
152       settranslate [on|off]
153           Default: on. Translate escaped octal value ('\000') in the index
154           file to their corespondig characters, it improve the interface if
155           amrecover is run in the same charset as the filename. Set it to off
156           if the charset of some filename is not compatible with the
157           amrecover charset.
158
159       mode
160           Displays the extracting mode for Samba shares.
161
162       history
163           Show the backup history of the current host and disk. Dates,
164           levels, tapes and file position on tape of each backup are
165           displayed.
166
167       pwd
168           Display the name of the current backup working directory.
169
170       cd dir
171           Change the backup working directory to dir.  If the mount point was
172           specified with setdisk, this can be a full pathname or it can be
173           relative to the current backup working directory. If the mount
174           point was not specified, paths are relative to the mount point if
175           they start with "/", otherwise they are relative to the current
176           backup working directory. The dir can be a shell style wildcards.
177
178       cdx dir
179           Like the cd command but allow regular expression.
180
181       lpwd
182           Display the amrecover working directory. Files will be restored
183           under this directory, relative to the backed up filesystem.
184
185       lcd path
186           Change the amrecover working directory to path.
187
188       ls
189           List the contents of the current backup working directory. See the
190           description of the setdate command for how the view of the
191           directory is built up. The backup date is shown for each file.
192
193       add item1 item2 ...
194           Add the specified files or directories to the restore list. Each
195           item may have shell style wildcards.
196
197       addx item1 item2 ...
198           Add the specified files or directories to the restore list. Each
199           item may be a regular expression.
200
201       delete item1 item2 ...
202           Delete the specified files or directories from the restore list.
203           Each item may have shell style wildcards.
204
205       deletex item1 item2 ...
206           Delete the specified files or directories from the restore list.
207           Each item may be a regular expression.
208
209       list file
210           Display the contents of the restore list. If a file name is
211           specified, the restore list is written to that file. This can be
212           used to manually extract the files from the Amanda tapes with
213           amrestore.
214
215       clear
216           Clear the restore list.
217
218       quit
219           Close the connection to the index server and exit.
220
221       exit
222           Close the connection to the index server and exit.
223
224       extract
225           Start the extract sequence (see the examples below). Make sure the
226           local working directory is the root of the backed up filesystem, or
227           another directory that will behave like that. Use lpwd to display
228           the local working directory, and lcd to change it.
229
230       help
231           Display a brief list of these commands.
232

EXAMPLES

234       The following shows the recovery of an old syslog file.
235       # cd /var/log
236       # ls -l syslog.7
237       syslog.7: No such file or directory
238       # amrecover MyConfig
239       AMRECOVER Version 2.4.2. Contacting server on oops ...
240       220 oops Amanda index server (2.4.2) ready.
241       Setting restore date to today (1997-12-09)
242       200 Working date set to 1997-12-09.
243       200 Config set to MyConfig.
244       200 Dump host set to this-host.some.org.
245       $CWD '/var/log' is on disk '/var' mounted at '/var'.
246       200 Disk set to /var.
247       /var/log
248       WARNING: not on root of selected filesystem, check man-page!
249       amrecover> ls
250       1997-12-09 daemon.log
251       1997-12-09 syslog
252       1997-12-08 authlog
253       1997-12-08 sysidconfig.log
254       1997-12-08 syslog.0
255       1997-12-08 syslog.1
256       1997-12-08 syslog.2
257       1997-12-08 syslog.3
258       1997-12-08 syslog.4
259       1997-12-08 syslog.5
260       1997-12-08 syslog.6
261       1997-12-08 syslog.7
262       amrecover> add syslog.7
263       Added /log/syslog.7
264       amrecover> lpwd
265       /var/log
266       amrecover> lcd ..
267       /var
268       amrecover> extract
269
270       Extracting files using tape drive /dev/nst0 on host 192.168.0.10
271
272       The following tapes are needed: DMP014
273
274       Restoring files into directory /var
275       Continue? [Y/n]: y
276
277       Load tape DMP014 now
278       Continue? [Y/n/t]: y
279       set owner/mode for '.'? [yn] n
280       amrecover> quit
281       200 Good bye.
282       # ls -l syslog.7
283       total 26
284       -rw-r--r--   1 root     other      12678 Oct 14 16:36 syslog.7
285
286       If you do not want to overwrite existing files, create a subdirectory
287       to run amrecover from and then move the restored files afterward.
288       # cd /var
289       # (umask 077 ; mkdir .restore)
290       # cd .restore
291       # amrecover
292       AMRECOVER Version 2.4.2. Contacting server on oops ...
293       ...
294       amrecover> cd log
295       /var/log
296       amrecover> ls
297       ...
298       amrecover> add syslog.7
299       Added /log/syslog.7
300       amrecover> lpwd
301       /var/.restore
302       amrecover> extract
303
304       Extracting files using tape drive /dev/nst0 on host 192.168.0.10
305       ...
306       amrecover> quit
307       200 Good bye.
308       # mv -i log/syslog.7 ../log/syslog.7-restored
309       # cd ..
310       # rm -fr .restore
311
312       If you need to run amrestore by hand instead of letting amrecover
313       control it, use the list command after browsing to display the needed
314       tapes.
315       # cd /var/log
316       # amrecover
317       AMRECOVER Version 2.4.2. Contacting server on oops ...
318       ...
319       amrecover> ls
320       ...
321       amrecover> add syslog syslog.6 syslog.7
322       Added /log/syslog
323       Added /log/syslog.6
324       Added /log/syslog.7
325       amrecover> list
326       TAPE DMP014 LEVEL 0 DATE 1997-12-08
327               /log/syslog.7
328               /log/syslog.6
329       TAPE DMP015 LEVEL 1 DATE 1997-12-09
330               /log/syslog
331       amrecover> quit
332
333       The history command shows each tape that has a backup of the current
334       disk along with the date of the backup, the level, the tape label and
335       the file position on the tape. All active tapes are listed, not just
336       back to the most recent full dump.
337
338       Tape file position zero is a label. The first backup image is in file
339       position one.
340       # cd /var/log
341       # amrecover
342       AMRECOVER Version 2.4.2. Contacting server on oops ...
343       ...
344       amrecover> history
345       200- Dump history for config "MyConfig" host "this-host.some.org" disk "/var"
346       201- 1997-12-09 1 DMP015 9
347       201- 1997-12-08 1 DMP014 11
348       201- 1997-12-07 0 DMP013 22
349       201- 1997-12-06 1 DMP012 16
350       201- 1997-12-05 1 DMP011 9
351       201- 1997-12-04 0 DMP010 11
352       201- 1997-12-03 1 DMP009 7
353       201- 1997-12-02 1 DMP008 7
354       201- 1997-12-01 1 DMP007 9
355       201- 1997-11-30 1 DMP006 6
356       ...
357       amrecover> quit
358

ENVIRONMENT

360       PAGER The ls and list commands will use $PAGER to display the file
361       lists. Defaults to more if PAGER is not set.
362
363       AMANDA_SERVER If set, $AMANDA_SERVER will be used as index-server. The
364       value will take precedence over the compiled default, but will be
365       overridden by the -s switch.
366
367       AMANDA_TAPE_SERVER If set, $AMANDA_TAPE_SERVER will be used as
368       tape-server. The value will take precedence over the compiled default,
369       but will be overridden by the -t switch.
370

SEE ALSO

372       amanda(8), amanda-client.conf(5), amrestore(8), amfetchdump(8),
373       readline(3)
374
375       The Amanda Wiki: : http://wiki.zmanda.com/
376

AUTHORS

378       Alan M. McIvor <alan@kauri.auck.irl.cri.nz>
379
380       Stefan G. Weichinger <sgw@amanda.org>
381
382
383
384Amanda 3.3.3                      01/10/2013                      AMRECOVER(8)
Impressum