KB Logo

TOLIS Group Knowledge Base

Browse KB by category:
Go to KB #:
Email   Bookmark

Restoring from tape with BRU Server using the command line. How is this done?

Views: 21032
Votes: 0
Posted: 22 Jan, 2008

Restoring from BRU Server Using the Command Line

During a restore operation from a tape-based archive, the restore appears to fail and you receive a message that reads:

"BRU restore summary not seen from agent; Bad restore?"

This in most cases, this is caused by the BRU Server Agent disconnecting due to timing out prior to the restore process being performed by the BRU Server Server or BRU Server restored the files and is unable to confirm that they were restored successfully.  You should check the client system for the files to see if they have been restored or not before continuing.

If you find that the files have not been restored, rest assured that you can still restore your data using BRU's command line capabilities.  The following steps outline what is required to perform the manual restore when restoring from tape.  If you need assistance in this process when restoring from disk, visit KB article #83 - "How do I restore a disk archive from the command line using BRU with BRU Server?"


Please read completely through the steps below before beginning your restore process. In the commands below, please be aware of spaces, case sensitivity, etc.  This is known as "syntax" - missing letters, spaces, or other characters may result in errors in the command while performing the restore process and may cause the command to not function as desired.

1. You need to obtain a few things that are required to create the command for the BRU restore.  First you need to get the archive ID (from Data Manager -> Archives) for the archive from which you want to restore.  You will also need the tape block size and  full path of the file(s) you want to restore.  If you need to restore the desktop (icons, folders, files, etc.) for user 'bru-user' on Mac OS X , the path will be something like:


You also need to obtain the block offset of the tape in question for that archive.  In the Mac OS X Console, this number will be in the bottom right corner of the BRU Server Console in Data Manager -> Archives.  Each tape used will display the offset value.  This value is where the archive starts on each tape.  You only need to write down the offset for the first tape used in the backup.  The first tape is the first one in the list. Here is an example:

KB #131 Block Offset
Figure - 1

In the figure - 1 screenshot above, the tape for the archive in question is tape A00004L2.  The archive starts at block 134472. Write down both numbers that are specific to your archive that you are restoring from.

The reason that you need the tape block size is because BRU needs to be told how to read the tape.  The block size, by default of BRU Server is 128k, however, this can be confirmed by checking the Tools -> Device Configuration panel.  The Write Cache is not important for this restore process, only the block size.

2. Now, you have the tape ID (or barcode if you have a library) and the offset that you need to use to start your restore.  However, you need to get the tape ready.  BRU, the I/O engine, doesn't know this information, so you have to provide this to BRU.  To do this, manually load the tape into the first tape drive of your library or simply into the drive for stand-alone drives.

3. You now need to use the command line to fast forward the tape to the specified offset.  If your offset is zero, then you can move on to step 4.

To fast forward the tape, simply run the command:

Mac OS X Command:

tapectl -v -f ntape0 seek 134472

Linux/Unix Command:

mt -f /dev/nst0 seek 134472

Notice that in the example above, the block offset of 134472 was specified.  This is the same number that shows in figure - 1. To confirm that the tape drive is actually at the correct block, run the command:

Mac OS X Command:

tapectl -v -f ntape0 tell

Linux/Unix Command:

mt -f /dev/nst0 tell

If the commands were run correctly, the output you should see is:

Mac OS X Result:

$ tapectl -v -f ntape0 tell
At block 134472

Linux/Unix Result:

$ mt -f /dev/nst0 tell
At block 134472

If this is not what you see, make sure that all of the commands you've run up to this point are correct in their syntax.

4. Now for the restore process. In the command line, you need to use the change directories command (cd) to the path where you want the files restored.  The files can only be restored to the local system with this process, they will then have to be copied to the remote system manually after the restore is complete.

Mac OS X/Linux/Unix Command:

cd /path/to/restore/files/to

5. Next, as the Root user (by using the 'sudo' command), you need to execute the following command to put everything that you've gathered all together:

Mac OS X Command:

sudo /usr/local/bru-server/bru -xvvvf ntape0 -b 128k -PA "/stuff/to/restore/"

Linux/Unix Command:

sudo /usr/local/bru-server/bru -xvvvf /dev/nst0 -b 128k -PA "/stuff/to/restore"

So, if you're trying to restore the 'bru-users' desktop, the correct tape is loaded, and the tape is positioned correctly, your command would be:

Mac OS X Command:

sudo /usr/local/bru-server/bru -xvvvf ntape0 -b 128k -PA "/Users/bru-user/Desktop/"

Linux/Unix Command:

sudo /usr/local/bru-server/bru -xvvvf /dev/nst0 -b 128k -PA "/Users/bru-user/Desktop"

The above command needs to be one line. The "-PA" above tells BRU to restore the files in the current directory that you're running the command in, hence the reason that you must "cd" to the directory you want to restore to in step 4. The "-b 128k" is the block size of the tape, this is what is obtained in step 1.

If you would like to overwrite any existing files during your restore process, then you must add "-ua" after the "-PA" option.  Therefore, using the above examples for the files to restore, your restore command will look like:

Mac OS X Command:

sudo /usr/local/bru-server/bru -xvvvf ntape0 -b 128k -PA -ua "/Users/bru-user/Desktop/"

Linux/Unix Command:

sudo /usr/local/bru-server/bru -xvvvf /dev/nst0 -b 128k -PA -ua "/Users/bru-user/Desktop"

NOTE: You will see a pair of messages reporting that the /etc/brutab file could not be read - this is normal and has no bearing on the restore that you are performing.  Additionally, this restore operation will only display information about the files selected for restore and will most likely take longer than 30 minutes since the original restore from within BRU Server timed out.  During this time, BRU will work silently, only displaying warnings or errors and then actual files/fodlers that match the paths you provided on the command line.  Please be patient.  If you would like to see the process and don't mind "watching the grass grow", you may increase the the verbosity level to 5 v's (the -xvvvf becomes -xvvvvvf).  This will display each file and folder as it is skipped because it does not match the restore selection.

6. Now, once the restore is complete, remember that BRU restores the full folder tree.  So if you choose to 'cd' to the '/Users/sysadmin/Desktop' folder for step 4, then the files will have been restored to the full path of:


In Linux, you can simply 'cd' to this directory in the command line.  However, in Mac OS X, users may find it easier to use Comand-Shift-G to bring up the 'Go to...' dialog and type the path in manually.

If you have trouble with these commands or questions, please contact Technical Support.

Others in this Category
document I have a new Fibre-Channel drive/library, but BRU Server is having a hard time using it, why?
document Does BRU Server support the ZFS filesystem?
document I have two NIC/Ethernet cards in my system, how do I tell BRU Server which one to use?
document I've setup an email address in my backup job, but I don't get the emails. Why not?
document BRU Server doesn't remain started or I'm getting a "gdbm fatal: read error" when BRU Server starts. What's causing this?
» More Articles

Powered by KnowledgebasePublisher
Page Load Time: 0.04283 seconds / 42.83 milliseconds.
Page File Size: 33879 bytes.