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

Amanda::Cmdline

NAME

Amanda::Cmdline - utilities for handling command lines

SYNOPSIS

  use Amanda::Cmdline;

  my $spec = Amanda::Cmdline::dumpspec_t->new($host, $disk, $datestamp, $level, $write_timestamp);
  print "host: $spec->{'host'}; disk: $spec->{'disk'}\n";

  my @specs = Amanda::Cmdline::parse_dumpspecs(["host", "disk", "date"],
                            $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP);

Amanda::Cmdline::dumpspec_t Objects

Note that this class was called Amanda::Cmdline::dumpspec_t in older versions; that name will still work, but is deprecated.

Keys

Each key contains a match expression, in the form of a string, or undef. Note that the values of these keys are read-only.

$ds->{'host'}

Hostname

$ds->{'disk'}

Disk name

$ds->{'datestamp'}

Dump timestamp.

$ds->{'level'}

Dump level

$ds->{'write_timestamp'}

Timestamp when the dump is written to storage media.

Methods

$ds->format()

Format the dumpspec as a string.

Package Functions

format_dumpspec_components($host, $disk, $datestamp, $level)

This function returns a string representing the formatted form of the given dumpspec. This formatting is the same as performed by $ds->format(), but does not need a Dumpspec.

parse_dumpspecs([@cmdline], $flags)

This function parses @cmdline into a list of Dumpspec objects, according to $flags, which is a logical combination of zero or more of

 $CMDLINE_PARSE_DATESTAMP - recognize datestamps
 $CMDLINE_PARSE_LEVEL - recognize levels
 $CMDLINE_EMPTY_TO_WILDCARD - if @cmdline is empty, make a wildcard dumpspec

These constants are available in export tag :constants. The command-line format is

  [host [disk [datestamp [level [host [..]]]]]]

Note that there is no facility for specifying write_timestamp on the command line.

header_matches_dumpspecs($hdr, [@dumpspecs])

This function compares a header to a list of dumpspecs, returning true if the header matches at least one dumpspec. If @dumpspecs is empty, the function returns false.

SEE ALSO

Amanda::Config handles -o options itself, through config_overrides.

ABOUT THIS PAGE

This page was automatically generated Tue Mar 19 07:08:15 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