Changer API/Configuration

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)

Jump to: navigation, search

Changer configuration is quite complex, now, for a few reasons:

  • the long-term goal is for users to think of giving Amanda a changer -- that changer will take care of selecting devices for Amanda.
  • consequently, tpchanger and tapedev are largely interchangeable
  • changers and devices can both be specified directly or via aliases ("define changer" and "define device")
  • supplying a device name as a changer automatically invokes Amanda::Changer::single
  • changers can also be specified via their old shell-script names, invoking Amanda::Changer::compat
  • there is a "default" changer (to which amdump dumps, and from which amrecover recovers), with the ability to specify other changers (currently only amrmtape and amvault support such specifications).

The consequences of various kinds of configuration are detailed below, but from the Amanda hacker's perspective, the only thing to worry about is calling

my $chg = Amanda::Changer->new();

or

my $chg = Amanda::Changer->new($otherchanger);

Configuration Matrix

What follows is an exhaustive list of the combinations of configuration options for a changer, and the resulting interpretation of the "default" changer.

global tapedevglobal tpchangertpchanger in changer def'nresult
- - - invalid
- dev uri - chg-single with dev
- dev alias - chg-single with dev
- changer uri - given changer with no config
- changer alias changer uri given changer with config from def'n
- changer alias changer scriptchg-compat with config from def'n
- changer script- chg-compat with global config
dev uri - - chg-single with dev
dev uri dev uri - invalid
dev uri dev alias - invalid
dev uri changer uri - invalid
dev uri changer alias changer uri invalid
dev uri changer alias changer scriptinvalid
dev uri changer script- chg-compat with global config
dev alias - - chg-single with dev
dev alias dev uri - invalid
dev alias dev alias - invalid
dev alias changer uri - invalid
dev alias changer alias changer uri invalid
dev alias changer alias changer scriptinvalid
dev alias changer script- chg-compat with global config
changer uri - - changer with global config
changer uri dev uri - invalid
changer uri dev alias - invalid
changer uri changer uri - invalid
changer uri changer alias changer uri invalid
changer uri changer alias changer scriptinvalid
changer uri changer script- invalid
changer alias - changer uri changer with config from def'n
changer alias - changer scriptchg-compat with config from def'n
changer alias dev uri changer uri invalid
changer alias dev uri changer scriptinvalid
changer alias dev alias changer uri invalid
changer alias dev alias changer scriptinvalid
changer alias changer uri changer uri invalid
changer alias changer uri changer scriptinvalid
changer alias changer alias changer uri invalid
changer alias changer alias changer scriptinvalid
changer alias changer scriptchanger uri invalid
changer alias changer scriptchanger scriptinvalid
Personal tools