BackupMedia

Managing Backup Media

The ZMC and Amanda use labels to identify backup media. Labels ensure that the correct backup media is loaded for the backup set, and that no backup is overwritten before the planned cycle is complete. When ZMC finds a labeled piece of media (or media that appears to already contain backup data), it will not write a backup to that tape. When the ZMC finds unlabeled media, it:

  1. Writes a label for subsequent identification
  2. A record of the new media is catalogued. This allows the ZMC to use new media before used media is recycled. Media is used in the order that it is labeled.

When the ZMC finds media that belongs to some other backup set (or media that has been written to by another application), it is not used, and an error message is returned. You can manually "force" labeling of such media by setting the Overwrite Media Option described below to Yes.

ZMC will not overwrite an existing backup tape until it has first written a number of fresh tapes equal to the number of tapes in the planned Backup How section.

Backup Media Overview

The Backup->Media page includes two tabs:

  • Label, which lets you label media and set up autolabeling rules:

backup_media_label.png

Click Load New Media to display a dialog that prompts you to load new media in the selected slots. When you load media and click Done, the ZMC reads the tape labels and refreshes the display.  Only media that contains no data is eligible for auto-labeling. The Suggested Label column shows how Amanda will label the tapes when you click Save Labels. Editing the prefix and starting number of the sequence is described below.

  • Media, which shows Amanda's media catalog and allows you to manipulate individual labeled media:

backup_media_media.png

Note: If you are backing up using virtual tapes (vtapes) or Amazon S3 storage, there is no media to manage, so the Backup Media displays a message to that effect. The table is described in more detail at the bottom of the page.

Warning: Please ensure that only one user at a time is interacting with the forms on the Backup|media page. Please wait for a requested operation to complete before starting a new operation. These restrictions apply to both Label and Media tabs.

 

Editing the Tape Label Prefix and starting number

From the Label tab, click the Edit button above the list of Suggested Labels to display the following dialog:

backup_media_label_media.png

Label Prefix
The label prefix string used for the media being labeled.

Starting Label Number
ZMC labels volumes in backup set name-num format. The Starting Label Number entered here determines the label number suffix. By default, the starting Label Number is 1. The only reason to use a number greater than one is if you are labeling additional tapes for an existing backup set that already has Tape Volumes associated. In that case use the last Label Number from the backup set plus one.
If the bar code reader is present and enabled for the tape changer in the Admin Devices page and the backup set is configured to use bar code reader on the device in the Backup Where page,  the tape bar code is appended to the volume label (backup set name-num-barcode format) by default. Adding bar code to the volume label makes it easier to track tapes. If you do not want to add bar code to the volume label and have some other method to track tapes, this feature can be disabled by clicking Advanced Options on the Label tab on this page and unselecting the Include Barcode checkbox.
 
If a Tape Changer has been specified on the Backup Where page along with a Starting Slot Number, the Starting Slot Number value is used here. Tapes are then labeled from the starting with that slot number, labeling tapes until the Number of tapes has been reached.

For example, if you have 10 tapes configured for a dumpcycle in the Backup When "Media in rotation" value, and you want to replace tapes from slot 5 to 8 with new tapes: Specify 4 as the number of tapes, and 5 as the starting slot number. Amanda will first label the tape in slot 5, and continue labeling tapes until all 4 tapes in slots 5 through 8 have been labeled in sequence.

Managing Media

The Media tab lists all of the media in Amanda's catalog for this backup set. Archive and Reuse buttons by each item allow you to set the media as "read-only"  (or elible for re-use) to Amanda. Use the check boxes to select media for recycling, dropping, or commenting as described below:

Comment
Displays a dialog that lets you add a comment to the selected media.

Recycle
Recycle identifies the media as immediately available for re-use (in other words, existing data on the media will be overwritten and lost). Recycle operations cannot be performed while a backup is in progress.
Drop
Removes the media and all backups it contains from the Amanda server.  Do not drop media that you wish to restore from in the future unless you first click the Archive button for that media, and then manually copy the data to a different location. Drop operations cannot be performed while a backup is in progress.

The rows in the media table are color-coded to show least-recently used tapes and tapes that are elible for use.

Tape Changer Bar Codes

Amanda Enterprise edition supports tape changers with bar code readers. To use bar codes in a backup set, it is necessary to initialize the bar code database. Initialization steps must be performed using command line tools. Initialization is required only if tapes were not labeled with bar code enabled or not managed using Zmanda Management Console.

1. Remove the existing bar code database file (if any) on the Amanda server.

$ /etc/amanda/<backup set name>/changer-barcodes

2. Create bar code database file for the backup set on the Amanda server. This process can take a lot of time. The process involves loading of all tapes in the tape changer and bar codes are read.

$ /usr/sbin/amtape <backup set name> update

This operation can be performed only after saving a Backup Where configuration for the backup set, and must be performed as the amandabackup user on the Amanda server.

 

Failure Messages

ZMC returns detailed error messages when it encounters situations such as:

  • There is no tape present in the tape drive or drive is not ready, or is busy with some other task.
  • A tape is missing in a particular slot that has been included in the range of slots for tape labeling.
    • You can insert a tape at that stage and continue.
  • Over-write option has not been selected, and a tape that had been a part of ZMC backup set is found in a slot.
  • Over-write option has not been selected, and a tape that is part of the current ZMC backup set is present in a slot.
  • Over-write option has not been selected, and a used tape is found in a slot.
  • Please note: When the over-write option is selected, all found tapes are labeled without further checks.