Using simple scripts to back up Linux
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
Backing up Linux? You can do it with just simple scripts, as this tip suggests. If you have a backup tip, why not send it in? We'll enter you in our tips contest and you might win a nifty prize.
Like Unix, Linux comes with the basic utilities needed to do backups as part of the operating system. While there are a number of commercial and open-source backup utilities available for Linux, using the built-in utilities stitched together with simple scripts is inexpensive and effective on small Linux systems.
Scripts have the additional advantage that they can be customized to back up in exactly the way and with the features you want. Of course the more elaborate and complex the feature set, the more skill it takes on the part of the scripter -- and the more time will be spent debugging and tuning the script.
Most simple scripts run tar against the directories to be backed up with verification. Others use more sophisticated utilities such as cpio. While there is a difference of opinion, it's generally not a good idea to further compress a tar archive used for backup with gzip. The reason is that further compression makes the backup more likely to fail by removing redundancy.
Karsten M. Self discusses simple backups for Linux in the "Linux Backups mini-FAQ", which includes a sample script. It is available at http://kmself.home.netcom.com/Linux/FAQs/backups.html. A page of backup information for Linux, including more examples of scripts is at: http://www.linux-backup.net/app.gwif.html.
Rick Cook has been writing about mass storage since the days when the term meant an 80K floppy disk. The computers he learned on used ferrite cores and magnetic drums. For the last twenty years he has been a freelance writer specializing in storage and other computer issues.
Did you like this tip? Whether you did or not, why not let us know. Drop us an email and sound off.
Red Hat® Linux® Administrator's Handbook, 2nd Edition
Author : Mohammed J. Kabir
Publisher : Hungry Minds
Published : Feb 2001
This shop manual for installing, configuring and troubleshooting Red Hat Linux 7.0 is written for the experienced network administrator and is designed to provide "just in time" instructions for solving immediate, specific problems.