Open-Source Backups Using Amanda
Listing 4. Using amrecover
[root]# amrecover -C DailySet1 AMRECOVER Contacting server on localhost 220 jule AMANDA index server (2.4.2p2) ready. 200 Access OK Setting restore date to today (2004-02-13) 200 Working date set to 2004-02-13. 200 Config set to DailySet1. 200 Dump host set to localhost. Can't determine disk and mount point from $CWD amrecover> sethost localhost 200 Dump host set to localhost. amrecover> setdisk /home 200 Disk set to /home. amrecover> ls 2004-01-29 condor/ amrecover> add condor Added dir /condor at date 2004-01-29 amrecover> extract Extracting files using drive /dev/nst0 on localhost. The following tapes are needed: DailySet3 Restoring files into directory /restored Continue? [Y/n]:
Each Amanda client stores helpful information from the crontab runs in /tmp/amanda. Here you can find logs from amandad, selfcheck (the check that runs prior to backup) and sendbackup, all with an accompanying date. Once the backups are completed, the tapes stored and changed and all backup procedures completed, it is not yet time to call it a wrap on the data. Amanda includes a couple of handy programs, amverify and amverifyrun, that verify the media as well as the data from any Amanda run that already has taken place. It is a good idea to run through amverify from time to time (as time allows, if not every time) to verify that your backups actually are going to be recoverable. Because you have dedicated the time and effort to configure and carry out a mostly automated and consistent backup scheme, it only makes sense to verify that all is well. And, you are keeping some of your sets of tapes off site, right?
I must quickly mention the sole visual utility available with Amanda, amplot. amplot has the ability to read an Amanda output file and create a graphical interpretation of your backups, allowing the administrator to determine the efficiency of the Amanda install and configuration and whether any changes need to be made.
Walking barefoot through broken glass is no fun. That being said, I have been in situations where I would rather walk through that broken glass barefoot than have to deal with miserable data recovery. Data recovery with Amanda, however, is both simple and fun. Well, maybe it isn't exactly fun, but a certain amount of satisfaction comes from restoring data. Running amrecover provides you with an easy-to-use command-line interface for browsing files and directories. The interface allows you to browse, add and extract single files or directories. This entails multiple steps, setting the date, setting the disk and setting the host. For example,
/usr/sbin/amrecover -C myconfig1 -t localhost -s localhost
instructs amrecover to use the DailySet1 configuration (-C), the index host of localhost (-t) and the Amanda server of localhost (-s); see Listing 4.
One fear when dealing with backups, especially indexed backups, is what happens when your master index drive fails. If you're recovering from indexes and your master Amanda drive fails, are you out of luck? Not at all. amrestore allows you to restore a full Amanda image without using indexes and without the need for any configurations. amrestore also can be used to do complete filesystem restores. In my experience, amrestore is most useful if you lose your master Amanda drive. You can start with a fresh install and run amrestore, recover the complete image and begin where you left off with all previous indexes and configurations. As a side note, I make a monthly dump of both the Amanda home directory and the Amanda configuration directories to an alternate machine. This allows me to reference the config files should a master drive die and unexpected problems arise.
Amanda is an excellent open-source backup application that is highly configurable to accommodate cross-platform backups. As with all software, it may not be the right application for every environment, but it does fit many backup needs. The following are what I see to be the pros and cons of the Amanda backup software.
Once Amanda is configured and the crontab is set up accordingly, it is possible to have hands-off consistent backups. Amanda can run on almost every UNIX and Linux platform available. It also is able to back up Windows data through Samba shares. In addition, Amanda is highly compatible with most backup media and hardware.
As for the cons, Amanda does not have the ability to span tapes at this time. This means that once each Amanda run is completed, the tape is moved to the bottom of the heap and a new tape is requested. Some users might consider the command-line interface to be a disadvantage. Finally, although it currently can be done, backing up to media other than tape, such as disk arrays, is somewhat difficult with Amanda.
Phil Moses spends his days working as a Systems Manager for the Physical Oceanography Group at Scripps Institution of Oceanography in San Diego, California. He spends his nights and time off dreaming of tropical environments with clean warm water, uncrowded waves, boats and plenty of tuna. Comments are invited at email@example.com.
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- Stunnel Security for Oracle
- The Firebird Project's Firebird Relational Database
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space