Destination:
EST Home Page Products Download a Demo! Press Releases Where to Buy Support Online Manuals Tech Tips Papers and Notes Mailing Lists Register Contact Info Employment Opportunities at EST EST's Affiliations Linux Related Links


Getting Started With BRU

BRU is designed primarily as a UNIX power-user's tool for performing system backup and recovery. As such, the many variations on the options available from the command line can be quite daunting for a first time user.

If you've ever used the UNIX command 'tar', you're already a good way towards understanding the way BRU operates from the command line. To simplify things, let's examine some of the basic properties of any BRU backup:

  • What operation are you invoking? Backup, Restore, Verify or Estimate?
  • What backup device are you using? A tape drive, a disk file, a floppy?
  • What file system or selection of files are you backing up or restoring?

Once you know these items, you need to examine the various modes and options that BRU provides. These include:

  • -c - Create (backup) a BRU backup volume
  • -x - Extract (restore) files from a BRU backup volume
  • -t - Table of Contents (file list) of a BRU backup volume
  • -i - Inspect (verify) the contents of a BRU backup volume
  • -e - Estimate the number of volumes a BRU backup will require
  • -d - Difference (compare) the contents of a BRU backup volume with the orig inal files on the file system
  • -v - Verbosity level (up to four v's may be specified)
  • -f - What backup device should be accessed
BRU's command line looks like this:
    bru -(mode) -(options) -f(device) (path)

With these basic modes and options, all basic backup and restore functions can be performed. For example, to backup the contents of the entire system to the first SCSI tape drive under SCO UNIX, we would issue the following BRU command:

    bru -cvf /dev/rStp0 /

This will backup the entire system to the tape drive rStp0.

To Examine the contents of a tape made in this manner, we could issue the command:

    bru -tvf /dev/rStp0

Notice that we don't have to specifiy a file path for a listing of the tape.

To restore the entire backup to its original path, we would use:

    bru -xvf /dev/rStp0

This call would automatically restore all files to their original locations.

To verify the contents of a BRU backup volume, there are two mechanisms available. The first is our recommended mechanism as it requires only the tape drive and BRU to operate. This is the Inspect (-i) mode.

    bru -ivf /dev/rStp0

This verification re-reads each buffer block written on the backup volume and recalculates the 32 bit CRC. BRU then compares this calculated CRC with the CRC that was written in the buffer block header. If any incorret value is detected, BRU will warn you that the checksum is bad for the particular file that the error occurred within.

The second mechanism is a more widely used method that requires both the backup volume and the original data. This mechanism is called the difference (-d) mode.

    bru -dvf /dev/rStp0

This mechanism reads the data from the tape and performs a bit-by-bit comparison with the original data from the file system. Of course, this mechanism will report problems if files have changed on the file system since the backup was made. This is what makes the inspect mode verification the preferred mechanism for verifying tapes.


Advanced Operations

Now that we understand the basic BRU operations, we can examine some of the more advanced options that can make the difference between a plain backup and a backup that provides enhanced functionality unavailable in other backup utilities.

BRU provides the following option flags for enhanced processing:

  • -L - Place a human-readable text label on the backup volume
  • -G - Create a file list that is placed at the head of the backup
  • -g - Read and display ONLY the backup volume information
  • -gg - Read and display the file listing created with the -G option
  • -n - Select files based on a date and time specification
  • -B - Run BRU in the background
  • -PA - Change Absolute paths to relative (strip the leading /)
  • -ua - Unconditionall overwrite ALL files during restore

These options allow you to more selectively control the backup or restore operation performed.

To Add the description "Full System Backup by Tim" to the backup example from above, we would issue:

    
    bru -cvVR -L "Full System Backup by Tim" -f /dev/rStp0 /
    

Now, when we examine the backup volume with bru -g, we see the following:

    
    # bru -gf /dev/rStp0
    label:          Full System Backup by Tim
    created:        Mon Apr 27 08:55:02 1998
    artime:         893692502l
    archive_id:     3544aa561537
    volume:         1
    writes:         3
    release:        15.0
    variant:        2000
    bufsize:        20480
    msize:          0
    msize_blks:     0
    serial_number:  xxxx-nnnn-n
    device:         /dev/rst0
    user:           root
    group:          root
    system:         Linux Stallion 2.0.33 #1 Wed J i786
    bru:            Fifth OEM Release
    command_line:   bru -cvVR -L "Full System Backup by Tim" -f /dev/rStp0 /
    
As you can see, we poke a lot of information into the volume header. The important items here are the label, creation date, volume, and command line.

If you wish to use BRU to perform "Incremental" or "Differential" backups, you COULD use 'find' and pipe the results to the BRU command, but, BRU provides a better method for locating files based on their date-time stamps - the '-n' option. Using the -n option, you can pass a standard date string, like "01-May-1999", or you can create a reference file and pass the name of that file to BRU, like "/et c/LASTFULL".

Here's a sample script that performs full backups on Saturday morning and Differ ential backups on all other days:

    
    #!/bin/sh
    DOW=`date +%w`
    if [ $DOW = 6 ]
    then
       touch /etc/LASTFULL
       bru -cvf /dev/rStp0 -L"Full Backup `date`" /
    else
       bru -cvf /dev/rStp0 -L"Differential Backup `date`" -n /etc/LASTFULL /
    fi
    

Service Marks, Trademarks, and / or registered trademarks used on this site are the sole properties of their respective owners.
Copyright 1999, Enhanced Software Technologies, Inc. All rights reserved.

Read our privacy statement.

Last modified: Wednesday, 22-Mar-2000 15:35:09 MST