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] [-h hostname] [-o configoption]...
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

COMMANDS

54       Amrecover connects to the index server and then presents a command line
55       prompt. Usage is similar to an ftp client. The GNU readline library is
56       used to provide command line history and editing if it was built in to
57       amrecover.
58
59       The purpose of browsing the database is to build up a restore list of
60       files to be extracted from the backup system. The following commands
61       are available:
62
63       sethost hostname
64           Specifies which host to look at backup files for (default: the
65           local host).
66
67       setdate YYYY-MM-DD-HH-MM[-SS] | YYYY-MM-DD
68           Set the restore time (default: now). File listing commands only
69           return information on backup images for this day, for the day
70           before with the next lower dump level, and so on, until the most
71           recent level 0 backup on or before the specified date is
72           encountered.
73
74           For example, if:
75
76               1996-07-01 was a level 0 backup
77               1996-07-02 through 1996-07-05 were level 1 backups
78               1996-07-06 through 1997-07-08 were level 2 backups
79
80           then the command setdate 1997-07-08-00 would yield files from the
81           following days:
82
83               1997-07-08 (the latest level 2 backup)
84               1997-07-05 (the latest level 1 backup)
85               1997-07-01 (the latest level 0 backup)
86
87           Only the most recent version of a file will be presented.
88
89           The following abbreviated date specifications are accepted:
90
91           --MM-DD
92               dates in the current year
93
94           ---DD
95               dates in the current month of the current year
96
97       setdisk diskname [mountpoint]
98           Specifies which disk to consider (default: the disk holding the
99           working directory where amrecover is started). It can only be set
100           after the host is set with sethost.  Diskname is the device name
101           specified in the amanda.conf or disklist(5). The disk must be local
102           to the host. If mountpoint is not specified, all pathnames will be
103           relative to the (unknown) mount point instead of full pathnames.
104
105       listhost [diskdevice]
106           List all host
107
108       listdisk [diskdevice]
109           List all diskname
110
111       listproperty
112           List all property
113
114       setproperty [append] [priority] name [value ...]
115           Set the property name to the value value. The append keyword
116           appends the value to the values already set for this property.
117           Without value, the property is unset. The priority keyword is
118           unused, it is present for ease of copy/paste from application
119           definition.
120
121       setdevice [[-h tape-server] tapedev]
122           Specifies the host to use as the tape server, and which of its tape
123           devices to use. If the server is omitted, the server name reverts
124           to the configure-time default. If the tape device is omitted, the
125           default is used.
126
127           If you want amrecover to use your changer, the tapedev must be
128           equal to the amrecover_changer setting on the server.
129
130           Since device names contain colons, you must always specify the
131           hostname.
132           settape 192.168.0.10:file:/file1
133           You can change the tape device when amrecover ask you to load the
134           tape:
135           Load tape DMP014 now
136           Continue? [Y/n/t]: t
137           Tape device: server2:/dev/nst2
138           Continue? [Y/n/t]: Y
139           Using tape /dev/nst2 from server server2.
140
141       setmode mode
142           Set the extraction mode for Samba shares. If mode is smb, shares
143           are sent to the Samba server to be restored back onto the PC. If
144           mode is tar, they are extracted on the local machine the same way
145           tar volumes are extracted.
146
147       mode
148           Displays the extracting mode for Samba shares.
149
150       history
151           Show the backup history of the current host and disk. Dates,
152           levels, tapes and file position on tape of each backup are
153           displayed.
154
155       pwd
156           Display the name of the current backup working directory.
157
158       cd dir
159           Change the backup working directory to dir.  If the mount point was
160           specified with setdisk, this can be a full pathname or it can be
161           relative to the current backup working directory. If the mount
162           point was not specified, paths are relative to the mount point if
163           they start with "/", otherwise they are relative to the current
164           backup working directory. The dir can be a shell style wildcards.
165
166       cdx dir
167           Like the cd command but allow regular expression.
168
169       lpwd
170           Display the amrecover working directory. Files will be restored
171           under this directory, relative to the backed up filesystem.
172
173       lcd path
174           Change the amrecover working directory to path.
175
176       ls
177           List the contents of the current backup working directory. See the
178           description of the setdate command for how the view of the
179           directory is built up. The backup date is shown for each file.
180
181       add item1 item2 ...
182           Add the specified files or directories to the restore list. Each
183           item may have shell style wildcards.
184
185       addx item1 item2 ...
186           Add the specified files or directories to the restore list. Each
187           item may be a regular expression.
188
189       delete item1 item2 ...
190           Delete the specified files or directories from the restore list.
191           Each item may have shell style wildcards.
192
193       deletex item1 item2 ...
194           Delete the specified files or directories from the restore list.
195           Each item may be a regular expression.
196
197       list file
198           Display the contents of the restore list. If a file name is
199           specified, the restore list is written to that file. This can be
200           used to manually extract the files from the Amanda tapes with
201           amrestore.
202
203       clear
204           Clear the restore list.
205
206       quit
207           Close the connection to the index server and exit.
208
209       exit
210           Close the connection to the index server and exit.
211
212       extract
213           Start the extract sequence (see the examples below). Make sure the
214           local working directory is the root of the backed up filesystem, or
215           another directory that will behave like that. Use lpwd to display
216           the local working directory, and lcd to change it.
217
218       help
219           Display a brief list of these commands.
220

EXAMPLES

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

ENVIRONMENT

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

SEE ALSO

360       amanda(8), amanda-client.conf(5), amrestore(8), amfetchdump(8),
361       readline(3)
362
363       The Amanda Wiki: : http://wiki.zmanda.com/
364

AUTHORS

366       Alan M. McIvor <alan@kauri.auck.irl.cri.nz>
367
368       Stefan G. Weichinger <sgw@amanda.org>
369
370
371
372Amanda 3.1.3                      10/04/2010                      AMRECOVER(8)
Impressum