Preparing for Preventing Data Loss


Backing up data is not fun. It takes time and resources, and 99.999 percent of the time it's not productive. For one person, it can be hard to justify taking the time to back up data, buy new storage media, and make sure your existing backups still work. But the day your hard drive decides to join the scrap heap is the day that all that time pays off. That's when you're reminded that backups are like insurance; you hope you never need it, but when you need it, you're really happy it's there.

The trick is knowing how much to back up, what to back up, and how often to back up. This section will help you sort out these issues before you start.

How to Lose Data

When you think about it, data stored on a computer is a fragile thing. Nothing but ones and zeros stored electromagnetically on a cheap metal platter. The storage industry does a fine job of protecting those digits, but it's almost a wonder that users don't lose more data than they do.

Aside from the times when you consciously press the Delete key or type rm <filename> at a shell prompt, when you talk about data loss, this is usually an unintended consequence stemming from various causes. Mother Nature is often at the root of the problem: thunderstorms leading to electrical power surges, tornadoes, floods, hurricanes, and fire can all make data disappear or become useless in an instant.

Floppy disks are fragile things. They can get bounced around enough to damage the disk and corrupt files.

Consider the unstable, buggy program you're using to create new data. When it hangs or crashes, you get a message warning you that All unsaved data will be lost.

Hard drives do die, no longer capable of storing your ones and zeros on their platters. Manufacturers even use a rating system of Mean Time Between Failures (MTBF) to quantify the number of hours a hard drive should function. And using wildcards to remove batches of unwanted files can result in wanted files disappearing, too.

Too often, however, data loss results from what technical support people call (privately) "keyboard-to-chair problems" good old human error. As long as there are humans, no matter how intelligent they happen to be, they will do not-so-intelligent things that can result in some level of data loss. Backups minimize the risk from all these causes of data loss.

Assessing Your Needs and Resources

In many ways, deciding on a backup strategy is predicated on the answers to two simple questions: What files do I need to back up, and how often do those files change?

The answers get down to a more critical question that lies beneath: What data is important to me?

When you have those issues settled, the question then becomes: What can I afford, in both time and money, to protect that important data? The answers to these questions diminish in importance if you have access to massive amounts of bandwidth or empty warehouses that can store terabytes of data in every square foot of the property. That probably does not describe you, however.

Some backup methods take longer than others, and the same is true for restore methods.

Consider the situation where you have to restore everything. Can you afford to be down as long as it takes to restore using your method? If it's just your machine, will you have to sit there swapping disks in and out every few minutes, or can you automate the process?

These are the questions that will help you formulate your backup strategy. After you have that strategy, it's important to practice it religiously and test it periodically.

Whatever strategy you select, make sure to carry out these practices with similar fervor:

  • Have more than one copy of critical data at all times.

  • Label the backups using some consistent method (by date, by type of file).

  • Store backups in a secure area with consistent temperatures.

  • Store critical data somewhere offsite. If all your backups are in your house, and the house catches fire, you're in trouble.

  • Try restoring from a backup regularly to make yourself comfortable with the process, and test the medium you're using.

  • Test your media. Problems with the CD or defects with the tape can mess things up.

Choosing a Backup Strategy

Everyone's situation is different, but we can make some generalizations about different types of users and their backup strategies.

  • Home users The critical issue for home users is not rebuilding the operating system and applications. With the SUSE Linux installation CDs, reinstalling the base packages for your system should take about an hour. What is critical is preserving your home directory and your configuration files. Backing up email is optional, depending on the volume and how important you think it is. Configuration files are generally stored in the /etc directory, so backing up /home and /etc is your primary task. If you have applications installed outside of YaST, you should back these up as well. Unless you have critical projects in the works, a weekly backup to a CD-RW or some other external storage drive is all that's required.

  • Small Office/Home Office (SOHO) Like home users, SOHO users can focus on keeping the data in the home directory secure, along with configuration files, business-related mail, and applications installed outside of YaST. SOHO users need to be more rigorous about backups than ordinary home users, because the consequences are greater. Daily backups of important files are a good idea. Because files stored on tape drives are faster to restore than other media, you may want to consider investing in a tape drive, although CDs may be just as good. Redundant drives may also be possible for you.

Many backup strategies are used today, but in this section we'll review some of the more popular ones. Tweak any one of them for your own purposes.

Caution

If you are running Windows and Linux on the same computer, don't back up both file systems in one fell swoop. Back up your Linux files with a Linux tool and Windows files in Windows.

YaST System Backup will also back up your partition table. See "Using YaST System Backup," later in this chapter.


Simple Strategy

If all you need is to back up a few small documents and some configuration files, you only need a floppy disk or two. Copy the files directly.

If you have a Zip drive or other high-capacity floppy, you can choose to back up the entire Documents directory for each user, plus the /etc directory for all your configuration files. Zip disks come in 100, 250, and 750MB varieties.

With a CD-RW or DVD-RW on hand, you should be able to use K3b to burn the entire home directory for all your users to a single 700MB CD.

The beauty of this strategy is that you can back up files on the spot, simply by copying every changed or new file to your chosen medium, although this is harder to do with a CD. It becomes problematic when your backups grow beyond a single disk. At that point, you'll want to adopt a more formal strategy, as in one of the following.

Full Backup Periodically

This is the standard backup process where you archive everything to your chosen medium on a weekly, biweekly, or monthly basis. The frequency depends on the importance of the data and how often it changes. Ideally, you can perform this backup to a designated network server, but depending on how much room your files take up, multiple CDs or DVDs may work.

The best way to do this is with archiving software, which is discussed later in the chapter.

Full Backups with Increments

This is the standard corporate backup routine used in medium-to-large networks. There's no technical reason smaller businesses can't do this, but it may be less necessary. With this strategy, you make a full backup to a tape weekly and back up new and changed files every day.

There are two ways of defining what is "new and changed" that is, what to include in an incremental backup. The easiest way to do this is to have a single tape (Level 1) reference the last full backup (Level 0) each day. This way, you have to keep track of only two tapes. The danger is that if a lot of things change during a given week, you may run out of tape.

The alternative is to have separate incremental tapes for each day. If you perform your full backup on Friday night, your first increment is Saturday, and it references the full backup. You then remove Friday's tape and insert Sunday's tape, which will include changes since Saturday, and onward to Thursday. So if someone comes to you and asks for the file they accidentally deleted on Wednesday, you can easily find Tuesday's backup tape and restore from there.

It's best to use a professional backup solution, such as Amanda or BRU, for these complicated backups. As a system administrator, then, all you have to worry about is changing tapes. The software handles the actual backup.



SUSE Linux 10 Unleashed
SUSE Linux 10.0 Unleashed
ISBN: 0672327260
EAN: 2147483647
Year: 2003
Pages: 332

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net