home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 20.1 tar in a Nutshell Chapter 20
Backing Up Files
Next: 20.3 How to Make Backups with a Local Tape Drive

20.2 Make Your Own Backups

As someone who has been an end user and a system administrator, I strongly believe that every user should understand the importance of backups.

NOTE: If you have data that is important to you, you should have a known backup.

Accidents and oversights happen. Tapes can be damaged, lost, or mislabeled. Assume that your system administrator is top-notch. The best administrator can recover your lost data 99 percent of the time. There is still a small chance that the files you need might not be recovered. Can you afford to duplicate months of effort 1 percent of the time? No.

An experienced user learns to be pessimistic. Typically, this important fact is learned the hard way. Perhaps a few hours are lost. Perhaps days. Sometimes months are lost.

Here are some common situations:

  • A user works on a file all day. At the end of the day, the file is deleted by accident. The system manager cannot recover the file. A day's work has been lost.

  • A programmer tries to clean up a project directory. Instead of typing rm *.o the programmer types rm * .o and the entire directory is lost.

  • A user deletes a file by accident. After a few days, the user asks the system administrator to recover the file. The incremental backup system has re-used the only tape the missing file was on.

  • A large project is archived on a magnetic tape and deleted from the disk. A year later, some of the information is needed. The tape has a bad block at the beginning. The system manager must learn how to recover data from a bad tape. The attempt is often unsuccessful. The information is lost forever, and must be re-created, at the cost of months of effort.

  • Someone breaks into a computer and accesses confidential information.

  • A fire breaks out in the computer room. The disks and all of the backup tapes are lost.

Gulp! I scared myself. Excuse me for a few minutes while I load a tape...

Ah! I feel better now. As I was saying, being pessimistic has its advantages.

Making a backup is easy. Get a blank tape and put a label on it. Learn how to load it onto the tape drive. Then do the following:




tar c .

Take the tape off. Write-protect the tape (slide the tab, turn the knob, or take out the ring). That's all.

[Not quite! Bruce also points out that you can get even more protection by using a version control system like SCCS ( 20.12 ) or RCS ( 20.14 ) to save every version of a file you are updating frequently. - TOR  ]

- BB

Previous: 20.1 tar in a Nutshell UNIX Power Tools Next: 20.3 How to Make Backups with a Local Tape Drive
20.1 tar in a Nutshell Book Index 20.3 How to Make Backups with a Local Tape Drive

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System