sections in this module City College of San Francisco - CS260A
Unix/Linux System Administration

Module: Backups
module list

Backup Types

Historically, backups were classified as full or incremental backups. This is better discussed using the concept of backup levels, as are used in the traditional (though outdated) Unix backup utilities dump and restore. The levels begin at 0 and increase as the amount of information they back up is reduced:

Level Meaning
0 Full backup (everything)
1 Backup of everything that changed since the last level 0 backup
2 Backup of everything that changed since the last level 1 backup
... ...

Here full backup could mean a full backup of everything that is backed-up. It could thus be limited to a single partition or to a single directory such as /home. In the traditional backup terminology, a full backup is a level zero backup and all higher level backups are incremental backups.

Using backup levels you can greatly reduce the amount of information being backed up. The process, of course, relies on maintaining a file of time stamps of the most recent backup performed at each level. (In the case of dump/restore, the timestamps were kept in /etc/dumpdates.) 

Using this scheme we could implement a simple backup plan

A backup scheme such as this greatly reduces the amount of information that must be backed up daily. It also has the advantage of only requiring three active backups: the most recent level 0, 1, and 2 backups.

Note: complete backup utilities (such as dump and restore) created output that contained not only the files backed up but information on any file deletions as well to allow recreation of the current system state.

There are several disadvantages to this scheme

Restoring information

The method of restoring information from the backups depends on whether you are recovering the entire data set or simply a deleted piece. To recover the entire dataset, restore the backups from the lowest level to the highest level sequentially. To recover a single piece of data, look for it starting with the highest level backup sequentially to the lowest level. The highest level that has a copy is the most recent version saved.

These restore procedures illustrate the drawback of adding backup levels. Although it decreases the amount of data that must be backed up at the highest level, it makes finding a particular piece of data more difficult and delays the full restoration of a system.

A simple incremental backup plan can be implemented using one of the archive programs we will cover next, our friend find with the option -newer, and timestamp files created by touch. This plan does not account for data deleted if a full restore is required, however.

Preview question: Most Unix users are familiar with the tar command. cpio, an alternate archive manager from System 5 Unix, is not used as commonly. See if you can find an instance of the use of cpio on your system. You might be surprised.

Prev This page was made entirely with free software on linux:  
Nvu, Kompozer
and Openoffice.org     
Next

Copyright 2008 Greg Boyd - All Rights Reserved.
Document made with Nvu