Amanda::Policy -- interface to policy
everything is done by the Amanda::Storage
All operations in the module return immediately, and take as an argument a callback function which will indicate completion of the changer operation -- a kind of continuation. The caller should run a main loop (see Amanda::MainLoop) to allow the interactions with the changer script to continue.
A new object is created with the new
function as follows:
my ($policy, $err) = Amanda::Policy->new(policy => $policy_name);
to create a named policy (a name provided by the user, either specifying a policy directly or specifying a storage definition).
If there is a problem creating the new object, then the resulting policy is undef, and err is set to an error message.
Thus the usual recipe for creating a new policy is
my ($policy, $err) = Amanda::Policy->new(policy => $policy_name);
if (!$policy) {
die("Error creating policy: $err");
}
Note that these variables are not set until after the subclass constructor is finished.
$policy>{'policy_name'}
Gives the name of the policy. This name will make sense to the user. It should be used to describe the policy in messages to the user.
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.
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head1'