Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [115]

By Root 2923 0
Sun’s engineering team is feeling blue, one of the managers tells a joke about some ignorant hick trying to back up his disks with dump, and they all have a good laugh. The actual dump command is /usr/sbin/ufsdump. Fortunately, ufsdump accepts the same flags and arguments as other systems’ traditional dump. For example, the command

# ufsdump 0uf /dev/rmt/2 /dev/rdsk/c0t3d0s5

dumps partition 5 of the drive at SCSI target 3 onto tape drive 2.

You will probably have to explicitly install dump and restore on your Linux systems. The default is to not install these commands. An rpm (Red Hat Package Manager) file is available for easy installation. Under Linux, nothing is statically linked, so you need the shared libraries in /lib to do anything useful (yuck). The restore commands in FreeBSD, OpenBSD, and NetBSD are statically linked. Static linking makes it easier to recover from a disaster because restore is then completely self-contained.

Dump sequences


Because dump levels are arbitrary (they have meaning only in relation to other levels), dumps can be performed on various schedules. The schedule that is right for you depends on:

• The activity of your filesystems

• The capacity of your dump device

• The amount of redundancy you want

• The number of tapes you want to buy

In the days when it took many tapes to back up a filesystem, complicated dump sequences were useful for minimizing the number of tapes consumed by each day’s backups. As tape capacities have grown, it has become less useful to make fine distinctions among dump levels.

Because most files never change, even the simplest incremental schedule eliminates many files from the daily dumps. As you add additional levels to your dump schedule, you divide the relatively few active files into smaller and smaller segments.

A complex dump schedule provides the following three benefits:

• You can back up data more often, limiting your potential losses.

• You can use fewer daily tapes (or fit everything on one tape).

• You can keep multiple copies of each file, to protect against tape errors.

In general, the way to select a sequence is to determine your needs in each of these areas. Given these constraints, you can design a schedule at the appropriate level of sophistication. We describe a couple of possible sequences and the motivation behind them. One of them might be right for your site—or, your needs might dictate a completely different schedule.

A simple schedule


If your total amount of disk space is smaller than the capacity of your tape device, you can use a completely trivial dump schedule. Do level zero dumps of every filesystem each day. Reuse a group of tapes, but every N days (where N is determined by your site’s needs), keep the tape forever. This scheme will cost you

(365/N) * (price of tape)

per year. Don’t reuse the exact same tape for every night’s dump. It’s better to rotate among a set of tapes so that even if one night’s dump is blown, you can still fall back to the previous night.

This schedule provides massive redundancy and makes data recovery very easy. It’s a good solution for a site with lots of money but limited operator time (or skill). From a safety and convenience perspective, this schedule is the ideal. Don’t stray from it without a specific reason (e.g., to conserve tapes or labor).

A moderate schedule


A more reasonable schedule for most sites is to assign a tape to each day of the week, each week of the month (you’ll need 5), and each month of the year. Every day, do a level 9 dump to the daily tape. Every week, do a level 5 dump to the weekly tape. And every month, do a level 3 dump to the monthly tape. Do a level 0 dump whenever the incrementals get too big to fit on one tape, which is most likely to happen on a monthly tape. Do a level 0 dump at least once a year.

The choice of levels 3, 5, and 9 is arbitrary. You could use levels 1, 2, and 3 with the same effect. However, the gaps between dump levels give you some breathing room if you later decide you want to add another

Return Main Page Previous Page Next Page

®Online Book Reader