TOC PREV NEXT INDEX

CHAPTER 10 Tape Management
Effective tape management depends on a thorough understanding of how Backup Professional deals with tapes. The key to tape management is understanding how tape labeling works. When a tape is labeled for the first time there are three critical pieces of information that you must be aware of. The first is the tape numbering, the second is the tape label name, and the third is the overwrite protection interval.

The first tape number is ten. Tape zero internally always represent the current tape and tapes 1-9 are reserved for special functions and features. The tape label is the common description of the tape. This can be customized when you label the tape, or it can be generated when Backup Professional automatically labels the tape.

The default format for the automatically labeled tape is contained in the Initialization file and is called DefLabel in the section Tape Commands. Note that there is an individualized setting for each tape drive that has a nickname. The following replacements will be made on the format string:

· %lu - The tape number
· %x - The current date
· %X - The current time

Readers familiar with the C library routine strftime() will be able to use those conversion characters with the default label format as well.

Understanding the tape overwrite protection interval is critical. This is the number of days the tape cannot and will not be overwritten. Currently the default is seven days. This means that after seven days a tape will automatically be recycled by Backup Professional. Whether or not Backup Professional automatically recycles the tape depends on several criteria. The first is the overwrite protection interval, the second is any other rules that might be in effect at the time.

By default, when the products ships there are two rules that are also in effect. One is called the last master rule and this means that if the tape contains the last master backup for any client on the network that tape cannot be overwritten but rather appended to. The other is the last incremental rule which is like last master rule, except that it applies to the last incremental backup. These two rules ensure that you do not accidentally wipe out the last critical backups for a particular computer. There is also the last parachute rule which applies for PC ParaChute backups. For example, if the last and/or only ParaChute backup is contained on a tape, the tape will not be overwritten.

A tape is recycled if the overwrite protection has expired and none of the other rules are met. When a tape is recycled the following actions happen:

· First, a new label is written on the tape with a new overwrite protection interval with a default which is specified in the Initialization file.
· Second, the tape is relabeled with same tape number and the same default label specified in the Initialization file.
· Third, the old backups are retired from the database and marked for later deletion. They are actually deleted at the completion of the next schedule or with the weekly update procedure which ever comes first.

10.1 Tape Labeling

Before a backup can be written to a tape, the tape must be labeled. However, you are not required to pre-label a tape before use. This can be performed automatically using default values for the first backup written to an unlabeled tape. An unlabeled tape is a tape that Backup Professional does not recognize.

The tape label is used to specify information about a tape; specifically, tape number, comment, block size, and capacity. The tape number and comment are used to identify the tape at a later time. The block size and capacity indicate how the data is written to the tape and how much data can fit on the tape.

10.1.1 Manually Labeling a Tape

To label a tape, from the Administration utility select the [Misc->Tape Utilities->Tape Commands] menu and select Label Tape. This displays the Label Tape dialog (Figure 45).
FIGURE 45. Label Tape Dialog

The steps required to label a tape are as follows:

1. Insert a tape into the tape drive.
1. Specify the tape drive in the dialog by selecting it from the Tape Device combo box. In Figure 45, the tape device 8mm_Tape is selected.
2. Enter a name to describe the tape into the Comment field. This may be anything you wish; for example, Judy's Source Code Tape.
3. Specify the number of days before the tape will automatically expire in the Retain field. If it is set to zero, the tape can be relabeled at anytime. The retention period is used to keep a tape from being overwritten. See "When Will a Tape Be Overwritten" on page 144 for more detail.
4. Enter the capacity of the tape into the Capacity field. The default value is set in this field from the device database entry. This value should have one of the letters K, M, or G appended to a number to indicate the value in kilobytes, megabytes, or gigabytes respectively. For example, an eight gigabyte tape drive would have the capacity value specified as 8G. The capacity defaults to kilobytes in the absence of any other factor letter.
5. The Block Size field specifies the size of data chunks that are written to the device. The default value is set in this field from the device database entry. Regardless of any other block size specified through a backup or restore, this value is the block size that will be used. Technically, the block size specified from a backup or restore command is the size of data chunks that are written from the client to the server on the network and not the size written to the tape.

When you are satisfied with the values you have entered into the form, press the [OK] button. You will notice messages indicating the tape-labeling progress. If the tape has previously been labeled and has not expired, you are reminded that you are potentially relabeling a valid tape. You must choose to either continue and scratch the tape or abort the relabeling. Scratching the tape has the effect of purging database information related to the tape and commonly occurs when a tape is automatically expired. This can be a very time consuming function depending on the number and size of backups on the tape.

Alternatively, you may label a tape from the command-line with:

$BPDIR/bin/inittape -d <dev_name> -l <comment> -e <retain> -z <capacity>

For example, to initialize the 8mm_Tape device with a 50-day retention period and eight gigabyte capacity (for inittape, capacity is specified in kilobytes), the command would be:

$BPDIR/bin/inittape -d 8mm_Tape -l "Judy's Source Code Tape" -e 50
-z 8000000

10.1.2 Automatically Labeling a Tape

When a backup begins, it checks the tape to make sure it has a valid BP tape label. If a label is not found, it will be automatically labeled using values specified in the Initialization file. This means you do not have to manually label a tape before it can be used by BP. Ramifications of automatically labeling tapes and directions on setting default label values are discussed below.

Automatically labeling a tape can cause non Backup Professional tapes to be overwritten. In the case where a site uses the tape drive for more than just Backup Professional backups, this can present a problem when someone's tape inadvertently left in the drive is overwritten with the next backup. To avoid this you can set the LabelBlankTapes setting from the specific tape device's section in the Initialization file to NO. See "Modify Initialization Files" on page 88 for information on setting this value.

For tapes that are automatically labeled, you will want to physically mark the tape with its new tape number. The default values for automatic tape labeling are read from the device nickname section in the Initialization file using the DefLabel setting. See "Tape Commands (Tape Definitions)" on page 348 for a full description of the possible default tape labeling values.

10.2 When Will a Tape Be Overwritten

Most sites enforce a very rigid definition of when a tape should be overwritten. To follow this model, we have implemented this strict behavior as the default rule. Unless modified by the administrator, Backup Professional will overwrite a tape when all of the following are true:
1. Performing a master/incremental backup of the server, or the tape is full
2. The tape does not contain the last master/incremental/PC ParaChute backup for any client
3. The retention period for the tape has expired

The policies above are on by default. To limit policies 2 or 3, you must make certain changes to the Initialization file. Specifically, you must set the value of LatestMastRule, LatestIncrRule, LatestPCparachuteRule from the Media Information section to NO if you do not want the policy to be considered. You can specify the default retention period for automatically labeled tapes by setting DefaultExpirationDays in the specific tape section in the Initialization file. See "Modify Initialization Files" on page 88 for information on how to modify these settings.

The minimum retention period for a tape is one day. Zero is not allowed as this would make the tape only hold one backup and each subsequent backup would write over the original backup. Keep in mind that the retention period is reviewed with each backup that is appended to the tape. So it is conceivable that if you are running a series of five backups and three of these backups occur after the overwrite protection interval has expired, the tape would be relabeled on the third backup. A new retention interval is set and your tape will be left with the three latest backups on the tape. Therefore, you should plan your tape rotation and overwrite protection periods very carefully.

10.3 Tape Utilities

Tape Utilities is a collection of menu items accessible by selecting the menu
[Misc->Tape Utilities->Tape Commands] or the tape toolbar button in the Administration utility.

10.3.1 Tape Commands

The Tape Commands dialog allows you to perform low-level tape device manipulation upon a tape drive. By selecting the Tape Device from the combo box you can perform these options:
· Test
· Label Tape
· Skip Filemark
· Rewind
· Get Tape Label
· Load Tape
· Tape Status
· Get Backup Label
· Unload Tape
· Tape Contents HistoryPosition arm (jukebox module only)
· Move a tape to slot (jukebox module only)
· Move a tape to drive (jukebox module only)

When the system is performing one of these tape commands, a separate window displays any output from the command.

FIGURE 46. Tape Commands Dialog

After selecting a tape from the combo box, press the TapeInfo button to get information about the current tape in the drive. This may take a minute while the tape is being read. The Tape Contents History button, below the TapeInfo button, is provided for quick access to the Tape Contents History dialog. See "Tape Contents History" on page 147.

If the selected device is configured as a jukebox, the lower section of the dialog allows you to position tapes to and from slots in the jukebox.

10.4 Tape Contents History

The Tape Contents History gives detailed information about tapes known to Backup Professional and is used to manage this information. This does not read a tape directly but uses the information from the Backup Professional database.
FIGURE 47. KnowledgeBase Dialog

The Tape Contents History dialog displays a list of selectable tapes that are known to exist within Backup Professional. By selecting a tape from the list, you may perform the following actions:

Retire
Removes all referenced backups from the database for the selected tape number. When complete, the specified tape number cannot be used for future backups. This option can be used if your site is particular about accounting for every tape. For instance, if a tape is lost or damaged, you should retire it. In this way, the hole in your physical tape library (i.e. the lost tape) will correspond to a retired tape, letting you know that the tape does not physically exist.
Detail
Gives detailed information about the tape, such as the number of backups available on the tape and the full tape record. It can also be used to indicate the amount of unused space on the tape.
Clear Status
Changes the selected tape to a usable status. This option is available to make a tape usable after a premature I/O error, when the tape was inadvertently marked full, or when the tape was previously retired. This should not be used if the tape is really being used. Doing so will result in a failure of the current process using the tape.
Delete
Like Retire, but will delete the tape number from the system, allowing another tape to be labeled using the selected tape number.

10.5 Importing A Tape

Generally, you will need to import a tape if you have deleted the tape from the Tape Contents History, or restored the BP database via a manual restore or during crash recovery. This operation is used to transfer certain information from a BP tape into the database. You do not need to import tapes already known to BP. You can import a tape using the Import Tape dialog (Figure 48) from the Administration utility [Misc->Tape Utilities->Import Tape] menu.
FIGURE 48. Import Tape Dialog

You can import backups for a specific client or for all clients found on the tape. The following options are available from the Import Tape dialog:

Device
Specifies the tape device with the backups that you wish to import.
Client
If selected and a valid client is specified, will only import backups from the tape that were for that client. Otherwise, all backups for all clients on the tape will be imported unless the client has not been configured (BP does not know about the client).
Import Unknown Clients
When import comes upon a client that has not been configured into BP it would normally skip it but print a warning message. If this option is selected, unknown clients will be imported. However, BP will configure the client as disabled and you will not be able to perform backups of this client until you enable it from the Client Configuration section of the Administration utility. See "Client Configuration" on page 70.
This option has meaning only when importing all clients from the tape.
Import Filenames Also
Unless this option is selected, you will not be able to choose individual files to restore from the imported backups. If not selected, the import will be much faster.
Non-Destructive Import
If this option is used, any backups encountered on the tape that also exist in the database will not be imported.

10.6 Deleting the Last Backup From a Tape

There are times when you wish to delete the last backup from a tape. This can happen, for example, when you run a backup and decide to cancel it. It may be you forgot to include an important directory, or perhaps you did not exclude some directories that you do not need. Regardless of the reason, you can delete the last backup from a tape by using the bputil program. For example, you cancel a backup running to tape #22 and then wish to delete the backup from the tape, you run the following command from a shell prompt:
$BP_BINDIR/bputil -T 22

If the backup had consumed 3 gigabytes of space on the tape, this space is reclaimed. The next backup that is done to that tape will start at the same spot on the tape that the deleted backup had started.

Do not perform this function if you have a Tandberg SLR type of tape drive. There is a bug in the tape drive BIOS that prevents proper positioning after this command is run.

10.7 Using Disk Files Instead of Tapes

Backup Professional does not restrict your use of backup media to tapes. Hard disk files can be used. This is quite convenient if you want to use a hard disk on the server as a staging area for the very latest backups for a set of computers on the network. Then later, the files can be archived to tape or even another hard disk.

You set up hard disk files as devices by specifying a short nick-name to use and then specifying the exact path to the disk file. This path is the same for the rewind and no-rewind device. For the control device, you use /dev/null. Be sure to indicate to Backup Professional that the device is not a tape and it is not a SCSI device.

Once established as a device, it can be used just like any other device to schedule backups to. In releases 1.5 and lower, the disk file can only contain one backup. This means if you want to perform backups on seven day a week basis, you must set up seven devices, each with unique nick-name and hard disk path. Since a schedule is limited to a single device, you set up a schedule for each day of the week.

Keep in mind, each disk file is overwritten each time it is used. When a fresh disk file device is created, it has no client ownership associated with it. The first time it is used, it will be owned by the client machine whose backup was performed. This means that other clients will not see this device in their device listings once a backup is performed on the device.

Since many times a large number of disk file devices need to be added, a batch method for adding disk devices has been provided. This is documented in the "1. First create the file /usr/bp/db/devices.build with the following format:"appendix.

10.8 Device Monitor

The device monitor is used to get a quick glance of the processes using the configured tape devices. You display the Device Monitor dialog (Figure 49) using the [Misc->Device Monitor] menu from the Administration utility. This dialog displays for each configured device, its status, the ID of the BP process currently using the device, the tape number currently loaded, and if the drive is enabled.
FIGURE 49. Device Monitor Dialog

If for whatever reason a BP process does not cleanly exit, it may leave the device in a BUSY state. If this happens, the device will not be made available until tasker performs its routine checks (every 30 minutes by default). If you know a device is not being used, but tasker has not gotten around to fixing the status, you can use the Reset button to make the device available for the selected device in the list.

This option is available for emergency purposes and should be used only under dire circumstances. You are warned if the device is in a BUSY state, giving you the opportunity to cancel. If you believe this state to be bogus, you may continue the operation. If the state is valid (some process is actually using the device) and you continue, chances are another task will cancel because it cannot open the device, or the device will forcibly rewind in the middle of a data-stream, rendering the entire tape useless.


TOC PREV NEXT INDEX