[go: up one dir, main page]

Menu

dk-bmm

Dirk Krause
← Previous ↑ Home → Next

dk-bmm — Manage backup media

Description

The dk-bmm program simplyfies backup media management.

A backup is a set of copies of a file or directory made for security reasons to prevent loss of data.
A backup is never on the same disk as the original file as a failing hard disk will cause loss of original file and copy.
A backup media is normally not available for writing to the computer (except while making backups). Otherwise malicious software could damage the original file and the copies.

A backup media is a storage device (i.e. DVD-RW, tape, or remote directory) used to save the copies.

A media set is a set of 10 such storage devices.

A backup set is a collection of files and directories saved together. Typically a backup set corresponds to a media set.

A backup cycle is a cycle of 200 backup operations on a media set. Each media is used 20 times. After completing a cycle the media differ in age. You always have media 1, 2, 3, or 4 backups old, the remaining media are older.
After completing a cycle you should switch to a new media set but keep the media from the completed cycle.

The dk-bmm program performs the following four operations:

  • Retrieve name of current backup media set (option -s).
     
  • Confirm that backup to current media set was finished successfully (options -s and -c).
     
  • Retrieve number of current backup media (default operation, neither -s nor -c required).
     
  • Confirm that backup to current media was finished successfully (option -c).
     

Example

Imagine a university faculty file server. We have the following backup sets:

Name Description
A Students home directories
B Staff member home directories
C Servers configuration files

We decide to make copies for set A three times a week, for set B and C once a week.

So our set names file set-names.txt looks like:

A B A C A

Each time we make a backup we retrieve the current backup set name first:

SETNAME=`dk-bmm -s set-names.txt`

Next we have to find the media number within the set:

MEDIANO=`dk-bmm set-$SETNAME.txt`

Now we can ask for the media:

echo Please insert and mount $SETNAME $MEDIANO

Depending on the set name we decide, what to do:

case "X$SETNAME" in
"XA")
  tar czf /media/…/A.tar.gz /home/students
;;
"XB")
  tar czf /media/…/B.tar.gz /home/stuff
;;
"XC")
  tar czf /media/…/C.tar.gz /etc
;;
esac

After finishing successfully we first confirm the media number:

dk-bmm -c set-$SETNAME.txt

Now we confirm the backup set:

dk-bmm -s -c set-names.txt

Finally we write a media number report:

dk-bmm -r set-$SETNAME.txt > report-$SETNAME.txt

In a real-world example one would use automation, i.e. do the backup outside working hours and send the request to insert next tape or media for next backup by e-mail…


Manual

See the [dk-bmm manual] for the full documentation of the program.


← Previous ↑ Home → Next

Related

Wiki: Home
Wiki: dk-bmm manual