UNIX System Administration Handbook - Evi Nemeth [128]
Next, we use amrestore to actually restore the data. We’d start with the tape Podunk-509, since it’s the level 0. After inserting the tape into the tape drive, we could run
% amrestore -p /dev/rmt/0bn zamboni c0t0d0s7 | restore if -
to locate the appropriate record and start an interactive restore. amrestore looks at each dump image on the tape until it finds the one we’re looking for, then splurts that dump image to its standard output to be read by the restore command. The actual restore procedure works just as described starting on page 180. After extracting from the level 0 tape, we’d repeat the process with the level 1 tape.
amrestore can recognize the appropriate dump because Amanda put a 32K header in front of each dump that records where it came from and how it was compressed. If compression was used, amrestore automatically pipes the tape image through the appropriate decompressor.
Searching all the headers can take quite a long time, since amrestore might have to skip over hundreds of filesystems. The output of amadmin shows which file set we’re looking for, so it is not really necessary to let amrestore do all this work. We can simply run mt fsf to fast-forward the tape before running amrestore.
You must run the restore process on the same operating system and architecture that generated the original dump. Amanda doesn’t know anything about the actual contents of the dump, and it can’t shield you from cross-platform compatibility issues.
If the Amanda logs are deleted, we can always look at the tape labels to find the tapes we need. But what if amrestore itself has been deleted? Fear not: amrestore doesn’t really do anything more than dd. If you look at the 32K header of the backup you want to restore, you’ll see instructions for restoring it. For example, here’s the header from the level 0 tape:
# mt -f /dev/rmt/0bn fsf 99
# dd if=/dev/rmt/0bn bs=32k count=1
AMANDA: FILE 19990928 zamboni c0t0d0s7 lev 0 comp .gz
To restore, position tape at start of file and run:
dd if= 1+0 records in 1+0 records out Alternatives to Amanda: other open source backup packages • BURT – a backup and recovery utility based on Tcl/TK 8.0 • CD Backup Linux – an automated utility designed specifically for CD-Rs • hostdump.sh – a quick and dirty backup utility • KBackup – a GUI-based backup tool for UNIX. Nice features. • star – a faster implementation of tar. Has some additional features such as automatic byte swapping. Won’t clobber existing files on restore. 10.9 COMMERCIAL BACKUP PRODUCTS Users’ laptops and other machines that are not consistently connected to your network should also be protected from failure. When looking at commercial products, you may want to ask if each product is smart enough not to back up identical files from every laptop. How many copies of command.com do you really need? Since we find that Amanda works well for us, we don’t have much experience with commercial products. We asked some of our big-bucks buddies at commercial sites for quick impressions of the systems they use. Their comments are reproduced below. ADSM/TSM
Several other free backup tools are available on the Internet for download. A few worth mentioning are:
We would all like to think that UNIX is the only OS in the world, but unfortunately, that is not the case. When looking at commercial backup solutions, you should consider their ability to handle any other operating systems that you are responsible for backing up. Most contemporary products take cross-platform issues into consideration and enable you to include Windows and Macintosh workstations in your UNIX backup scheme. You must also consider non-UNIX storage arrays and file servers.
This product was developed by IBM and later purchased