Browse KB by category:
Go to KB #:
How does BRU layout it's archives and catalogs on tape?
TOLIS Group's BRU Tape and Catalog Layout
With the release of BRU Server and the retirement of BRU-Pro, all BRU products use the same basic tape layout. Whether you use BRU Server, BRU's XBRU X11 Interface, or BRU LE on Mac OS X , all tapes will be created using the format described below.
As such, with a bit of scripting, you can gain access to a tape created by BRU LE, BRU PE, XBRU, or BRU Server with BRU from the command line making use of the QFA information contained within the catalog sets on the tape.
Additionally, understanding the tape layout will allow BRU users to manually restore data in the event that their BRU Server Server becomes unavailable.
As shown in the figure below, the BRU tape layout is basically 2 elements -
Each of these segments is separated by a 'filemark' (FM) - a special block type on tape that allows the drive to move easily and quickly between data segments. A tape drive can search for filemarks without reading the intervening data blocks. This means that a DDS
tape that normally moves at 1/2" per second can be sped up to 100" per second to make locating specific data segments 200 times faster than an equivalent read of the intervening data blocks. The tape drive determines the end of data (EOD) by placing two filemarks just before the null space.
To access a specified segment, use mt to step to its starting point. For example, if you wanted to extract (restore) the data in the second backup set illustrated above, you would step over 2 filemarks with mt as in:
or on Mac OS X
This will move the tape forward to the start of the 3rd data segment on the tape (BACKUP SET 2) leaving the tape positioned ready to read the data in that data segment.
If you are using a library (such as with BRU Server), use mtx or libctl to load the tape that you wish to access. To simplify access, you may choose to symlink the actual device node to /dev/changer:
This will allow you to use mtx without the -f option:
For information on using tapectl on Mac OS X, visit the "Controlling A Tape Library" KB
BRU's 10-v Output
If you would like to make use of QFA functionality, you may do this outside of BRU LE, XBRU, or BRU Server through some simple command line processes. When BRU Server, BRU LE, or XBRU tapes are created, BRU is run with level 10 verbosity (-vvvvvvvvvv). This is a special level that modifies the way BRU reports its operations as to be more easily processed by a wrapper program. The output from such a run will look like:
The fields (separated by the "|" symbol) are defined as follows (all numbers are hexadecimal):
BRU's 9-v Output (this is the format used for BRU PE Catalogs)
If you would like to make use of BRU's 9-v (-vvvvvvvvv) QFA functionality, you may do this outside of the BRU GUI using some simple command line processes. Like the 10-v output, this is a special level that modifies the way BRU reports its operations as to be more easily processed by a wrapper program. The output from such a run will look like:
The fields (separated by the "|" symbol) are defined as follows (all numbers are in decimal):
Restore Example Using QFA
To set up a scenario, we have a tape with our entire system backed up via XBRU. We need to restore the /etc directory. Here are the steps we'll follow:
BRU Server User Note: Use mtx (Linux) or libctl (OS X) to load and unload the tapes in a library. Also, the path to execute BRU is /usr/local/bru-server/bru.
1. Restore the catalog for our backup set
mt -f /dev/nst0 rewind
2. Examine the file to find our block location
Get the first entry:
#grep --binary-files=text \/etc /usr/tmp/BRUP3d4977f008d8 | head -1
3. Restore the /etc directory
# restore the data
If you have any questions about this process, please contact TOLIS Group Technical Support.