The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

BBConfig::Accounts - Access to Box Backup account config files

SYNOPSIS

  use BoxBackup::Config::Accounts;
  $bbconfig = BoxBackup::Config::Accounts->new();

or

  use BoxBackup::Config::Accounts;
  $file = "/etc/bbox/accounts.txt";
  $bbconfig = BoxBackup::Config::Accounts->new($file);

  @accounts = $bbconfig->getAccountIDs();
  foreach $i (@accounts)
  {
      # Find out what account is on what diskset.
      $disk = $bbconfig->getDisk($i);
  }
  

ABSTRACT

BoxBackup::Config::Accounts is a rather simple package that lets the user have access to the data from the accounts configuration file for Box Backup. It provides methods to retrieve the data only. No creation or editing is supported.

DESCRIPTION

Allows for programmatic access to the information stored in the Box Backup 'accounts' config file, which simply holds the mapping between accounts and disk sets.

Methods

  • new(). The new() method parses the accounts file given as the first (and only) parameter, or, if none are given, parses /etc/box/bbstored/accounts.txt, and creates the object.

  • getAccountIDs(). The getAccountIDs() method returns a sorted array of all the account IDs found in the config file. This will often be used for processing all the accounts in some way.

  • getDisk(). The getDisk() method returns a diskset ID when given an account ID.

AUTHOR Per Reedtz Thomsen (mailto:pthomsen@reedtz.com)