Package CedarBackup2 :: Package extend :: Module sysinfo
[show private | hide private]
[frames | no frames]

Module CedarBackup2.extend.sysinfo

Provides an extension to save off important system recovery information.

This is a simple Cedar Backup extension used to save off important system recovery information. It saves off three types of information:

The saved-off information is placed into the collect directory and is compressed using bzip2 to save space.

This extension relies on the options and collect configurations in the standard Cedar Backup configuration file, but requires no new configuration of its own. No public functions other than the action are exposed since all of this is pretty simple.

Author: Kenneth J. Pronovici <pronovic@ieee.org>

Note: If the dpkg or fdisk commands cannot be found in their normal locations or executed by the current user, those steps will be skipped and a note will be logged at the INFO level.

Function Summary
  executeAction(configPath, options, config)
Executes the sysinfo backup action.

Variable Summary
list DPKG_COMMAND = ['/usr/bin/dpkg', '--get-selections']
str DPKG_PATH = '/usr/bin/dpkg'
list FDISK_COMMAND = ['/sbin/fdisk', '-l']
str FDISK_PATH = '/sbin/fdisk'
Logger logger = <logging.Logger instance at 0x3ae6094c>
list LS_COMMAND = ['ls', '-laR', '/']

Function Details

executeAction(configPath, options, config)

Executes the sysinfo backup action.
Parameters:
configPath - Path to configuration file on disk.
           (type=String representing a path on disk.)
options - Program command-line options.
           (type=Options object.)
config - Program configuration.
           (type=Config object.)
Raises:
ValueError - Under many generic error conditions
IOError - If the backup process fails for some reason.

Variable Details

DPKG_COMMAND

Type:
list
Value:
['/usr/bin/dpkg', '--get-selections']                                  

DPKG_PATH

Type:
str
Value:
'/usr/bin/dpkg'                                                        

FDISK_COMMAND

Type:
list
Value:
['/sbin/fdisk', '-l']                                                  

FDISK_PATH

Type:
str
Value:
'/sbin/fdisk'                                                          

logger

Type:
Logger
Value:
<logging.Logger instance at 0x3ae6094c>                                

LS_COMMAND

Type:
list
Value:
['ls', '-laR', '/']                                                    

Generated by Epydoc 2.1 on Mon Sep 4 13:49:32 2006 http://epydoc.sf.net