Tape/Volume Management

This document describes utility programs written to aid Bacula users and developers in dealing with Volumes external to Bacula.

Requirements

  • Each of the following programs requires a valid Storage Daemon configuration file (actually, the only part of the configuration file that these programs need is the Device resource definitions). This permits the programs to find the configuration parameters for your archive device (generally a tape drive). By default, they read bacula-sd.conf in the current directory, but you may specify a different configuration file using the -c option.

  • Each of these programs require a device-name where the Volume can be found. In the case of a tape, this is the physical device name such as /dev/nst0 or /dev/rmt/0ubn depending on your system. For the program to work, it must find the identical name in the Device resource of the configuration file. See below for specifying Volume names.

Note

If you have Bacula running and you want to use one of these programs, you will either need to stop the Storage Daemon, or unmount any tape drive you want to use, otherwise the drive will be busy because Bacula is using it.

  • If you are attempting to read or write an archive file rather than a tape, the device-name should be the full path to the archive location including the filename. The filename (last part of the specification) will be stripped and used as the Volume name, and the path (first part before the filename) must have the same entry in the configuration file. So, the path is equivalent to the archive device name, and the filename is equivalent to the volume name.

  • In general, you must specify the Volume name to each of the programs below (with the exception of btape). The best method to do so is to specify a bootstrap file on the command line with the -b option. As part of the bootstrap file, you will then specify the Volume name or Volume names if more than one volume is needed. For example, suppose you want to read tapes tape1 and tape2. First construct a bootstrap file named say, list.bsr which contains:

    Volume=test1|test2
    

    where each Volume is separated by a vertical bar. Then simply use:

    ./bls -b list.bsr /dev/nst0
    

    In the case of Bacula Volumes that are on files, you may simply append volumes as follows:

    ./bls /tmp/test1\|test2
    

    where the backslash () was necessary as a shell escape to permit entering the vertical bar (|).

    And finally, if you feel that specifying a Volume name is a bit complicated with a bootstrap file, you can use the -V option (on all programs except bcopy) to specify one or more Volume names separated by the vertical bar (|). For example,

    ./bls -V Vol001 /dev/nst0
    

    You may also specify an asterisk (*) to indicate that the program should accept any volume. For example:

    ./bls -V\* /dev/nst0
    

Read more:

Go back to the main Bacula Enterprise Management page.