Amanda-2.6.0

Amanda::Device


NAME

Amanda::Device - interact with Amanda data-storage devices


SYNOPSIS

  use Amanda::Device qw( :constants );
  my $dev = Amanda::Device->new($device_name);
  $dev->set_startup_properties_from_config();
  if ($dev->read_label() == $READ_LABEL_STATUS_SUCCESS) {
      print "Label on $device_name is '$dev->volume_label'\n";
  }
  
See http://wiki.zmanda.com/index.php/Device_API for details on how Devices are used.


API STATUS

Stable


Amanda::Device Objects

Instance Variables

$file
$block
$in_file
$device_name
$access_mode
$is_eof
$volume_label
$volume_time

Methods

See the wiki for descriptions of these functions

read_label()
start($mode, $label, $timestamp)
finish()
start_file($jobinfo)

where $jobinfo is a dumpfile_t (see the Amanda::Datatypes manpage)

write_min_size()
write_max_size()
read_max_size()
write_block($size, $data, $short_block)

Note that Perl code is not expected to handle on-device data, so there is currently no way to provide data to this function from Perl. This may change in future revisions.

write_from_fd($fd)

where $fd is an integer file descriptor, not a filehandle

finish_file()
seek_file($file)
seek_block($block)
read_block($size)
read_to_fd($fd)

where $fd is an integer file descriptor, not a filehandle

Note that Perl code is not expected to handle on-device data, so there is currently no way to access the data this function returns. This may change in future revisions.

property_list()

returns a list of property names.

property_get($property_name)

returns the property as the appropriate Perl type.

property_set($property_name, $value)

where $value is of an appropriate type for the given property

recycle_file($filenum)
set_startup_properties_from_config()


CONSTANTS

This module defines a large number of constants. Again, consult the wiki or device.h for the details on their meaning. These constants are available from the package namespace (e.g., Amanda::Device::ACCESS_WRITE), of imported with the :constant import tag.


ABOUT THIS PAGE

This page was automatically generated Mon Nov 17 19:29:37 2008 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.


Amanda-2.6.0