BackupMedia

Version as of 03:12, 6 May 2024

to this version.

Return to Version archive.

View current version

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, lets you label media and set up autolabeling rules,
  • Media, shows Amanda's media catalog and allows you to manipulate individual media.

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.

 

Tape Label Name
The label prefix string used for the media being labeled.
Number of Tapes
Enter the number of tapes you wish to label. Estimate the number of tapes you expect to use from One Full backup set to the start of the next backup set (in other words, a complete dumpcycle). Enter a high estimate (50% higher than your minimum "guesstimate) until you have more experience with completing backup cycles. Also, make sure that there are sufficient blank tapes in the changer (or on hand).
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 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 "tapes 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.

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.