ArGest Backup User Guide

  1. Home
  2. Docs
  3. ArGest Backup User Guide
  4. Advanced Terminal Operation
  5. Advanced Operations

Advanced Operations

Now that we understand the basic BRU command line 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, including:

-L – Place a human-readable text label on the backup volume
-g – Read and display ONLY the backup volume information
-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 – Unconditionally 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” to the backup example from above, we would use:

bru -cvVR -L “Full System Backup” -f tape0 /

Using bru -g, returns the following:

# bru -gf tape0
label: Full System Backup by Tim
created: Mon Apr 27 08:55:02 1998
artime: 893692502l
archive_id: 3544aa561537
volume: 1
writes: 3
release: 17.0
variant: 0.3
bufsize: 32768
msize: 0
msize_blks: 0
serial_number: xxxx-nnnn-n
device: tape0
user: root
group: root
system: Linux giza 2.0.33 #1 Wed J i686
bru: Fifth OEM Release
command_line: bru -cvVR -L “Full System Backup” -f tape0 /

As you can see, there’s a lot of information in 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, however, 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 /etc/LASTFULL.
Here’s a sample script (change the device for your system) that performs full backups on Saturday morning and differential backups on all other days:

#!/bin/sh
#
# This script performs full system backups on Saturday of
# each week and then performs differential (data changed
# since last full backup) backups on all other days.
#
# It would be run by cron at some time in the evening
# when everyone is logged out of the system for best
# coverage.
#######################################################

DOW=`date +%w`
if [ $DOW = 6 ]
then
touch /etc/LASTFULL
bru -cvf tape0 -L”Full Backup `date`” /
else
bru -cvf tape0 -L”Differential Backup `date`” -n /etc/LASTFULL /
fi

For more information on the uses of BRU’s command line operations, be sure to review the remaining chapters of this manual.