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

NAME

6       amrecover - Amanda index database browser
7

SYNOPSIS

9       amrecover [-C config] [-s index-server] [-t tape-server]
10                 [-d tape-device] [-o configoption]...
11
12       amoldrecover [-C config] [-s index-server] [-t tape-server]
13                    [-d tape-device]...
14

DESCRIPTION

16       Amrecover browses the database of Amanda index files to determine which
17       tapes contain files to recover. Furthermore, it is able to recover
18       files.
19
20       In order to restore files in place, you must invoke amrecover from the
21       root of the backed up filesystem, or use lcd to move into that
22       directory, otherwise a directory tree that resembles the backed up
23       filesystem will be created in the current directory. See the examples
24       below for details.
25
26       Amrecover will read the amanda-client.conf file and the
27       config/amanda-client.conf file. If no configuration name is supplied on
28       the command line, Amrecover will try the compiled-in default
29       configuration ,usually DailySet1.
30
31       Amanda 2.5.1 introduced a new recover protocol. Backup communication
32       works with any combination of versions, but 2.5.1´s amrecover cannot
33       communicate with an older server. Use amoldrecover on 2.5.1 and higher
34       clients when communicating with an older server.
35
36       See the amanda(8) man page for more details about Amanda.
37

OPTIONS

39           Note
40           The Default values are those set at compile-time. Use amrestore to
41           recover client-encrypted or client-custom-compressed tapes.
42
43       [ -C ] config
44           Amanda configuration.
45
46       -s index-server
47           Host that runs the index daemon.
48
49       -t tape-server
50           Host that runs the tape server daemon.
51
52       -d tape-device
53           Tape device to use on the tape server host.
54
55       -o clientconfigoption
56           See the "CONFIGURATION OVERRIDE" section in amanda(8).
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       setdevice [[-h tape-server] tapedev]
117           Specifies the host to use as the tape server, and which of its tape
118           devices to use. If the server is omitted, the server name reverts
119           to the configure-time default. If the tape device is omitted, the
120           default is used.
121
122           If you want amrecover to use your changer, the tapedev must be
123           equal to the amrecover_changer setting on the server.
124
125           Since device names contain colons, you must always specify the
126           hostname.
127           settape 192.168.0.10:file:/file1
128           You can change the tape device when amrecover ask you to load the
129           tape:
130           Load tape DMP014 now
131           Continue? [Y/n/t]: t
132           Tape device: server2:/dev/nst2
133           Continue? [Y/n/t]: Y
134           Using tape /dev/nst2 from server server2.
135
136       setmode mode
137           Set the extraction mode for Samba shares. If mode is smb, shares
138           are sent to the Samba server to be restored back onto the PC. If
139           mode is tar, they are extracted on the local machine the same way
140           tar volumes are extracted.
141
142       mode
143           Displays the extracting mode for Samba shares.
144
145       history
146           Show the backup history of the current host and disk. Dates,
147           levels, tapes and file position on tape of each backup are
148           displayed.
149
150       pwd
151           Display the name of the current backup working directory.
152
153       cd dir
154           Change the backup working directory to dir.  If the mount point was
155           specified with setdisk, this can be a full pathname or it can be
156           relative to the current backup working directory. If the mount
157           point was not specified, paths are relative to the mount point if
158           they start with "/", otherwise they are relative to the current
159           backup working directory. The dir can be a shell style wildcards.
160
161       cdx dir
162           Like the cd command but allow regular expression.
163
164       lpwd
165           Display the amrecover working directory. Files will be restored
166           under this directory, relative to the backed up filesystem.
167
168       lcd path
169           Change the amrecover working directory to path.
170
171       ls
172           List the contents of the current backup working directory. See the
173           description of the setdate command for how the view of the
174           directory is built up. The backup date is shown for each file.
175
176       add item1 item2 ...
177           Add the specified files or directories to the restore list. Each
178           item may have shell style wildcards.
179
180       addx item1 item2 ...
181           Add the specified files or directories to the restore list. Each
182           item may be a regular expression.
183
184       delete item1 item2 ...
185           Delete the specified files or directories from the restore list.
186           Each item may have shell style wildcards.
187
188       deletex item1 item2 ...
189           Delete the specified files or directories from the restore list.
190           Each item may be a regular expression.
191
192       list file
193           Display the contents of the restore list. If a file name is
194           specified, the restore list is written to that file. This can be
195           used to manually extract the files from the Amanda tapes with
196           amrestore.
197
198       clear
199           Clear the restore list.
200
201       quit
202           Close the connection to the index server and exit.
203
204       exit
205           Close the connection to the index server and exit.
206
207       extract
208           Start the extract sequence (see the examples below). Make sure the
209           local working directory is the root of the backed up filesystem, or
210           another directory that will behave like that. Use lpwd to display
211           the local working directory, and lcd to change it.
212
213       help
214           Display a brief list of these commands.
215

EXAMPLES

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

ENVIRONMENT

343       PAGER The ls and list commands will use $PAGER to display the file
344       lists. Defaults to more if PAGER is not set.
345
346       AMANDA_SERVER If set, $AMANDA_SERVER will be used as index-server. The
347       value will take precedence over the compiled default, but will be
348       overridden by the -s switch.
349
350       AMANDA_TAPE_SERVER If set, $AMANDA_TAPE_SERVER will be used as
351       tape-server. The value will take precedence over the compiled default,
352       but will be overridden by the -t switch.
353

SEE ALSO

355       amanda(8), amanda-client.conf(5), amrestore(8), amfetchdump(8),
356       readline(3), : http://wiki.zmanda.com
357

AUTHORS

359       Alan M. McIvor <alan@kauri.auck.irl.cri.nz>
360
361       Stefan G. Weichinger <sgw@amanda.org>
362
363       Dustin J. Mitchell <dustin@zmanda.com>
364           Zmanda, Inc. (http://www.zmanda.com)
365
366
367
368Amanda 2.6.1p2                    11/05/2009                      AMRECOVER(8)
Impressum