AMRECOVER(8) AMANDA INDEX AMRECOVER(8)NAMEamrecover - Amanda index database browser
SYNOPSISamrecover [ [ -C ] config ] [ -s index-server ] [ -t tape-
server ] [ -d tape-device ]
DESCRIPTION
Amrecover browses the database of Amanda index files to
determine which tapes contain files to recover. Further-
more, it is able to actually recover files backed up with
DUMP or GNUTAR, but not (yet) with XFSDUMP, VXDUMP, VDUMP
or SMBCLIENT.
In order to restore files in place, you must invoke amre-
cover from the root of the backed up filesystem, or use
lcd to move into that directory, otherwise a directory
tree that resembles the backed up filesystem will be cre-
ated in the current directory. See the examples below for
details.
See the amanda(8) man page for more details about Amanda.
OPTIONS
[ -C ] config
Amanda configuration (default: DailySet1).
-s index-server
Host that runs the index daemon (default: local-
host).
-t tape-server
Host that runs the tape server daemon (default:
localhost).
-d tape-device
Tape device to use on the tape server host
(default: /dev/nrst0).
COMMANDS
Amrecover connects to the index server and then presents a
command line prompt. Usage is similar to an ftp client.
The GNU readline library is used to provide command line
history and editing if it was built in to amrecover.
The purpose of browsing the database is to build up a
restore list of files to be extracted from the backup sys-
tem. The following commands are available:
sethost hostname
Specifies which host to look at backup files for
(default: the local host).
Alan M. McIvor 29 November 1996 1
AMRECOVER(8) AMANDA INDEX AMRECOVER(8)
setdate YYYY-MM-DD
Set the date (default: today). File listing com-
mands return information only on files from backups
for this day, for the day before with the next
lower dump level, and so on, until the most recent
level 0 backup on or before the specified date is
encountered.
For example, if:
1996-07-01 was a level 0 backup
1996-07-02 through 1996-07-05 were level 1 backups
1996-07-06 through 1997-07-08 were level 2 backups
then if 1997-07-08 is the requested date, files
from the following days would be used:
1997-07-08
1997-07-05
1997-07-01
Only the most recent version of a file will be pre-
sented.
The following abbreviated date specifications are
accepted:
--MM-DD
dates in the current year
---DD dates in the current month of the
current year
setdisk diskname [ mountpoint ]
Specifies which disk to consider (default: the disk
holding the working directory where amrecover is
started). It can only be set after the host is set
with sethost. Diskname is the device name speci-
fied in the amanda.conf or disklist configuration
file. The disk must be local to the host. If
mountpoint is not specified, all pathnames will be
relative to the (unknown) mount point instead of
full pathnames.
history
Show the backup history of the current disk. Dates
and levels of each backup are displayed.
pwd Print the name of the current backup working direc-
tory.
cd dir Change the backup working directory to dir. If the
mount point was specified with setdisk, this can be
a full pathname or it can be relative to the
Alan M. McIvor 29 November 1996 2
AMRECOVER(8) AMANDA INDEX AMRECOVER(8)
current backup working directory. If the mount
point was not specified, then paths are relative to
the mount point if they start with "/", otherwise
they are relative to the current backup working
directory.
lpwd Print the amrecover working directory. When you
restore files, this directory will be considered
the root of the backed up filesystem.
lcd path
Change the directory that will be considered the
root of the restored filesystem to path.
ls List the contents of the current backup working
directory. See the description of the setdate com-
mand for how the view of the directory is built up.
The backup date is shown for each file.
add path1 [ path2 ... ]
Add the specified files or directories to the
restore list. Each path may have shell style wild-
cards.
addx path1 [ path2 ... ]
Add the specified files or directories to the
restore list. Each path may be a regular expres-
sion.
delete path1 [ path2 ... ]
Delete the specified files or directories from the
restore list. Each path may have shell style wild-
cards.
deletex path1 [ path2 ... ]
Delete the specified files or directories from the
restore list. Each path may be a regular expres-
sion.
list [ file ]
Display the contents of the restore list. If a
file name is specified, the restore list is written
to that file. This can be used to manually extract
the files from the Amanda tapes with amrestore.
clear Clear the restore list.
quit Close the connection to the index server and exit.
exit Close the connection to the index server and exit.
extract
Start the extract sequence (see the examples
below). Make sure the local working directory is
Alan M. McIvor 29 November 1996 3
AMRECOVER(8) AMANDA INDEX AMRECOVER(8)
the root of the backed up filesystem, or another
directory that will behave like that. Use lpwd to
print the local working directory, and lcd to
change it.
help Display a brief list of these commands.
EXAMPLES
The following shows the recovery of an old syslog file.
# cd /var/log
# ls -l syslog.7
syslog.7: No such file or directory
# amrecover
AMRECOVER Version 1.1. Contacting server on localhost ...
220 localhost AMANDA index server (1.0) ready.
Setting restore date to today (1997-12-09)
200 Working date set to 1997-12-09.
200 Config set to DailySet1.
200 Dump host set to this-host.some.org.
$CWD '/var/log' is on disk '/var' mounted at '/var'.
200 Disk set to /var.
/var/log
WARNING: not on root of selected filesystem, check man-page!
amrecover> ls
1997-12-09 daemon.log
1997-12-09 syslog
1997-12-08 authlog
1997-12-08 sysidconfig.log
1997-12-08 syslog.0
1997-12-08 syslog.1
1997-12-08 syslog.2
1997-12-08 syslog.3
1997-12-08 syslog.4
1997-12-08 syslog.5
1997-12-08 syslog.6
1997-12-08 syslog.7
amrecover> add syslog.7
Added /log/syslog.7
amrecover> lpwd
/var/log
amrecover> lcd ..
/var
amrecover> extract
Extracting files using tape drive /dev/nrst0 on host localhost
The following tapes are needed: DMP014
Restoring files into directory /var
Continue? [Y/n]: y
Load tape DMP014 now
Continue? [Y/n]: y
Alan M. McIvor 29 November 1996 4
AMRECOVER(8) AMANDA INDEX AMRECOVER(8)
set owner/mode for '.'? [yn] n
amrecover> quit
200 Good bye.
# ls -l syslog.7
total 26
-rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
If you do not want to overwrite existing files, create a
subdirectory to run amrestore from and then move the
restored files afterward.
# cd /var
# (umask 077 ; mkdir .restore)
# cd .restore
# amrecover
AMRECOVER Version 1.1. Contacting server on localhost ...
...
amrecover> cd log
/var/log
amrecover> ls
...
amrecover> add syslog.7
Added /log/syslog.7
amrecover> lpwd
/var/.restore
amrecover> extract
Extracting files using tape drive /dev/nrst0 on host localhost
...
amrecover> quit
200 Good bye.
# mv -i log/syslog.7 ../log/syslog.7-restored
# cd ..
# rm -fr .restore
If you need to run amrestore by hand instead of letting
amrecover control it, use the list command after browsing
to display the needed tapes.
# cd /var/log
# amrecover
AMRECOVER Version 1.1. Contacting server on localhost ...
...
amrecover> ls
...
amrecover> add syslog syslog.6 syslog.7
Added /log/syslog
Added /log/syslog.6
Added /log/syslog.7
amrecover> list
TAPE DMP014 LEVEL 0 DATE 1997-12-08
/log/syslog.7
/log/syslog.6
TAPE DMP015 LEVEL 1 DATE 1997-12-09
Alan M. McIvor 29 November 1996 5
AMRECOVER(8) AMANDA INDEX AMRECOVER(8)
/log/syslog
amrecover> quit
The history command shows each tape that has a backup of
the current disk along with the date of the backup, the
level, the tape label and the file position on the tape.
All active tapes are listed, not just back to the most
recent full dump.
Tape file position zero is a label. The first backup is
file position one.
# cd /var/log
# amrecover
AMRECOVER Version 1.1. Contacting server on localhost ...
...
amrecover> history
200- Dump history for config "DailySet1" host "this-host.some.org" disk "/var"
201- 1997-12-09 1 DMP015 9
201- 1997-12-08 1 DMP014 11
201- 1997-12-07 0 DMP013 22
201- 1997-12-06 1 DMP012 16
201- 1997-12-05 1 DMP011 9
201- 1997-12-04 0 DMP010 11
201- 1997-12-03 1 DMP009 7
201- 1997-12-02 1 DMP008 7
201- 1997-12-01 1 DMP007 9
201- 1997-11-30 1 DMP006 6
...
amrecover> quit
AUTHOR
Alan M. McIvor <alan@kauri.auck.irl.cri.nz>
SEE ALSOamanda(8), amrestore(8), readline(3)Alan M. McIvor 29 November 1996 6