4.0.0alpha.svn.7719
Amanda modules list
List of All Modules
All Amanda Releases

Amanda::Label

NAME

Amanda::Label - Amanda module to handle label on volume.

SYNOPSIS

  # create a Label class
  my $Label = Amanda::Label->new(storage  => $storage,
                                 catalog  => $catalog,
                                 user_msg => \&user_msg);

  $Label->assign(...);
  $Label->label(...);
  $Label->erase(...);
  $Label->reuse(...);
  $label->no_reuse(...);

user_msg callback

The user_msg is a method that take an Amanda::Message as argument. This methos is called every time a message must be sent to the caller.

Label Objects

assign

  $Label->assign(finished_cb => $cb,
                 label       => $label,
                 meta        => $meta,
                 barcode     => $barcode,
                 pool        => $pool,
                 storage     => $storage,
                 comment     => $comment,
                 force       => $force);

Assign the meta, barcode, pool and storage to the label, they can be undef to not modify the setting. An empty string will remove the setting.

The finished_cb method is called with an Amanda::Message argument.

label

  $Label->label(finished_cb => $cb,
                label       => $label,
                slot        => $slot,
                barcode     => $barcode,
                meta        => $meta,
                force       => $force);

Label a volume with the label, the volume is selected by the slot or barcode or the current slot. meta verifies it is the same as on the changer.

The finished_cb method is called with an Amanda::Message argument.

erase

  $Label->erase(finished_cb   => $cb,
                labels        => @labels,
                erase         => $erase,
                keep_label    => $keep_label,
                external_copy => $external_copy,
                cleanup       => $cleanup,
                dry_run       => $dry_run);

Remove labels from the amanda database, erase the volume is erase is set, keep the label is keep_label is set,

Run amtrmlog and amtrmidx is cleanup is set.

Do nothing is dry_run is set.

The finished_cb method is called with an Amanda::Message argument.

reuse

  $Label->reuse(finished_cb => $cb,
                labels      => @labels);

Mark all labels as reuse, calling the changer set_reuse method.

The finished_cb method is called with an Amanda::Message argument.

no_reuse

  $Label->no_reuse(finished_cb => $cb,
                   labels      => @labels);

Mark all labels as reuse, calling the changer set_no_reuse method.

The finished_cb method is called with an Amanda::Message argument.

ABOUT THIS PAGE

This page was automatically generated Tue Mar 19 07:08:16 2019 from the Amanda source tree, and documents the most recent development version of Amanda. For documentation specific to the version of Amanda on your system, use the 'perldoc' command.


4.0.0alpha.svn.7719