Package CedarBackup2 :: Package actions :: Module rebuild
[show private | hide private]
[frames | no frames]

Module CedarBackup2.actions.rebuild

Implements the standard 'rebuild' action.

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

Function Summary
  executeRebuild(configPath, options, config)
Executes the rebuild backup action.
  _findRebuildDirs(config)
Finds the set of directories to be included in a disc rebuild.

Variable Summary
Logger logger = <logging.Logger instance at 0x402e2ccc>

Function Details

executeRebuild(configPath, options, config)

Executes the rebuild backup action.

This function exists mainly to recreate a disc that has been "trashed" due to media or hardware problems. Note that the "stage complete" indicator isn't checked for this action.

Note that the rebuild action and the store action are very similar. The main difference is that while store only stores a single day's staging directory, the rebuild action operates on multiple staging directories.
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 there are problems reading or writing files.

_findRebuildDirs(config)

Finds the set of directories to be included in a disc rebuild.

A the rebuild action is supposed to recreate the "last week's" disc. This won't always be possible if some of the staging directories are missing. However, the general procedure is to look back into the past no further than the previous "starting day of week", and then work forward from there trying to find all of the staging directories between then and now that still exist and have a stage indicator.
Parameters:
config - Config object.
Returns:
Correct staging dir, as a dict mapping directory to date suffix.
Raises:
IOError - If we do not find at least one staging directory.

Variable Details

logger

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

Generated by Epydoc 2.1 on Thu Mar 29 20:58:27 2007 http://epydoc.sf.net