Amanda modules list
List of All Modules
All Amanda Releases



Amanda::Cmdline - utilities for handling command lines


  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::dumpspec_t Objects

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


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




Disk name


Dump timestamp.


Dump level


Timestamp when the dump is written to storage media.



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.


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


This page was automatically generated Tue Oct 4 19:45:36 2016 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.