Linux Unleashed, Third Edition:Backups
-->
Previous
Table of Contents
Next
Chapter 45Backups
by Tim Parker
In This Chapter
Why make backups?
Backup logs
Using tar for backups
There are three rules of system administration: 1) Backup!, 2) Backup!, and 3) Backup! Although this may sound trite, the number of people who have lost important or valuable datanot to mention all the configuration information they spend days correctingis enormous. Even if you dont have a tape drive or other backup storage device, you should get in the habit of backing up your data. This chapter looks at how to properly do backups.
Lets begin by putting this chapter in context: if you run a system that has many users, network access, email, and so on, backups should be a very important aspect of the daily routine. If your system is used more for your own pleasure and not for any important files, then backups are not as important except as a way to recover your configuration and setup information. In either case, you should make backupsthe only difference is the frequency with which you make them and how much effort you go to in order to generate backups.
Why Make Backups?
A backup is a copy of the file system or files on part of a file system stored onto another medium that can be used later to re-create the original. In most systems, the medium used for backups is tape, but floppy disks or secondary and removable hard disks can also be used.
There are so many potential sources of damage to a modern computer system, they seem to overwhelm you at times. Damage to your hard disks and their file systems and data can occur from hardware failures, power interruptions, or badly typed commands. Having a backup is sometimes your only chance of getting lost information back. While the actual process of forcing yourself to make backups can be tiresome and time-consuming, this is often outweighed by the time required to recoup any lost information in case of problems. With utilities like cron available, the task of backing up can be made much easier, too.
Part of the potential for damage (and hence the need for backups) with Linux is the nature of an operating system itself. Since Linux is a multiuser and multitasking operating system, at any moment there are many system files open. At most millisecond increments, data is being written to or read from a hard disk (even when the system has no users on it or user-started background processes).
Also, Linux maintains a lot of information in memory about its current state and the state of the file systems. This information must be written to disk frequently. When CPU processes are interrupted, system files and tables can be lost from memory. Disk files can be left in a temporary state that doesnt match the real file system status.
While damage to a file system can occur from many sourcesnot all of which are under the control of the system administratorit is the administrators task to make sure the system can be restored to a working state as quickly as possible.
This brings up one final aspect about backups: where to keep the backup media after it has been used. For most home users, the only option is to store the tapes, drives, floppies, or other media in the same place as the Linux machine. Make sure the location is away from magnetic fields (including telephones, modems, televisions, speakers, and so on). For systems that are used for more than pleasure, consider keeping copies away from the main machine, preferably away from the same physical location. This type of off-site backup lets you recover your data in case of a catastrophic event, such as a fire, that destroys your system and backup media library.
Backup Media
By far the most commonly used medium for backups is tape, especially tape cartridges. Tape is favored because it has a relatively low cost, easy storage requirement, and reasonable speed. The process of writing and reading data from a tape is reliable, and tapes are portable from machine to machine. All you need, of course, is a tape drive. If you dont have one, you need to find another usable medium for backups.
Possible alternative media include removable hard disks of many different types, such as the Iomega Bernoulli or ZIP drives. These are disk-platter systems, usually in a protective cartridge, that can be completely removed from the system and stored elsewhere. Several of these disks can then be cycled much like tapes are.
Another possibility is another hard disk. With the price of hard disks dropping all the time, another hard disk just for backups can be added to your system (or any other system connected by a network) and used as a full backup. The popular writable CD-ROM and WORM (write once, read many) drives makes them viable alternatives, as well.
A floppy disk drive is usually considered as a last resort backup device for large file systems, although it is very good for backing up small files. High capacity floppy drives are beginning to appear now, but the lack of Linux drivers make them unusable for most backup situations.
Previous
Table of Contents
Next
Wyszukiwarka
Podobne podstrony:
ReadMe (755)20030817180104id!755745 746mbdch20 745755 75795 4310 745 000 2006 Tora Service Guide641 745745 2003 petrol YES745 a755 757755 (2)więcej podobnych podstron