UNIX System Administration Handbook - Evi Nemeth [107]
Choose filesystems carefully
Filesystems that are rarely modified do not need to be backed up as frequently as users’ home directories. If only a few files change on an otherwise static filesystem (such as /etc/passwd in the root filesystem), these files can be copied every day to another partition that is backed up regularly.
The Usenet spool directory on a news server is a good example of a filesystem that should not be backed up; don’t waste the time and tape. News is volatile and could never be restored to its exact state in the past. That’s why web sites like www.deja.com are popular with Usenet junkies.
If /tmp is a separate filesystem, it should not be backed up. The /tmp directory should not contain anything essential, so there is no reason to preserve it. In case this seems obvious, we know of one large site that does daily backups of /tmp.
Make daily dumps fit on one tape
In a perfect world, you could do daily dumps of all your user filesystems onto a single tape. High-density media such as DLT and AIT make this goal practical for some sites. You can mount a tape every day before you leave work and run the dumps late at night from cron. That way, dumps occur at a time when files are not likely to be changing, and the dumps have minimal impact on users.
See Chapter 9 for more information about cron.
Unfortunately, this goal is becoming less and less realistic. When users can purchase 40GB disks for $240, there’s not much of an economic barrier to the escalation of disk space. Why clean up your disks and enforce quotas when you can just throw a little money at the problem?
If you can’t fit your daily backups on one tape, you have several options:
• Buy a higher-capacity tape device.
• Buy a stacker or library and feed multiple pieces of media to one device.
• Change your dump sequence.
• Write a smarter script.
• Use multiple backup devices.
Your automated dump system should always record the name of each filesystem it has dumped. Good record keeping allows you to quickly skip forward to the correct filesystem when you want to restore a file. It is also a good idea to record the order of the filesystems on the outside of the tape. (We’ve said it before, but it bears repeating: be sure to use the nonrewinding tape device to write tapes with multiple dumps.)
Make filesystems smaller than your dump device
dump is perfectly capable of dumping filesystems to multiple tapes. But if a dump spans multiple tapes, an operator must be present to change tapes1
and the tapes must be carefully labeled to allow restores to be performed easily. Unless you have a good reason to create a really large filesystem, don’t do it.
Keep tapes off-site
Most organizations keep backups off-site so that a disaster such as a fire cannot destroy both the original data and the backups. “Off-site” can be anything from a safe deposit box at a bank to the President’s or CEO’s home. Companies that specialize in the secure storage of backup media guarantee a secure and climate-controlled environment for your archives. Always make sure your off-site storage provider is reputable, bonded, and insured.
The speed with which tapes are moved off-site should depend on how often you need to restore files and on how much latency you can accept. Some sites avoid making this decision by performing two dumps a day (to different tape devices): one that stays on-site and one that is moved immediately.2
Protect your backups
Dan Geer, a security consultant, said, “What does a backup do? It reliably violates file permissions at a distance.” Hmmm.
Secure your backup tapes. They contain all of your organization’s data and can be read by anyone who has physical access to them. Not only should you keep your tapes off-site, but you should also keep them under lock and key. If you use a commercial storage facility for this purpose, the company you deal with should guarantee the confidentiality of the tapes in their care.
Some companies feel so strongly about the importance of backups that they make