BoxBackup::Config::DiskSets - Access to Box Backup diskset config files
use BoxBackup::Config::DiskSets; $diskSets = BoxBackup::Config::DiskSets->new();
or
use BoxBackup::Config::DiskSets; $file = "/etc/bbox/raidfile.conf"; $diskSets = BoxBackup::Config::DiskSets->new($file); @diskNames = $diskSets->getListofDisks(); foreach $i (@diskNames) { print "Block size of " . $i . " is " . $disksets->getParamVal($i, "BlockSize) . " bytes.\n"; }
BoxBackup::Config::DiskSets is a rather simple package that lets the user have access to the data from the disk set configuration file for Box Backup. It provides methods to retrieve the data only. No creation or editing is supported.
Config::Scoped.
Allows for programmatic access to the information stored in the Box Backup 'disk set' config file, which holds the information related to each disk set in the Box Backup installation.
new(). The new() method parses the disksets file given as the first (and only) parameter, or, if no parameter is given, parses /etc/box/raidfile.conf, and creates the object.
getListofDisks(). The getListofDisks() method returns an array of the names of all the disk sets found in the config file.
getParamVal(). The getParamVal() method returns the value of a paramter for a given disk. 2 paramters are passed to this method
disk. This diskset for which the parameter should be retrieved. Normally 'disc0' or 'disc1', although anything is possible. Use getListofDisks() to retrieve the names from the file.
parameter. The parameter you wish to retrieve from the config file, for a given disk (see above). Currently, the following parameters are available in the file:
Per Reedtz Thomsen (mailto:pthomsen@reedtz.com)
To install BBackupd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BBackupd
CPAN shell
perl -MCPAN -e shell install BBackupd
For more information on module installation, please visit the detailed CPAN module installation guide.