Amanda::Label - Amanda module to handle label on volume.
# 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(...);
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->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(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.
$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.
$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.
$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.
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.