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

Module CedarBackup2.actions.util

Implements action-related utilities

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

Function Summary
  findDailyDirs(stagingDir, indicatorFile)
Returns a list of all daily staging directories that do not contain the indicated indicator file.
  getBackupFiles(targetDir)
Gets a list of backup files in a target directory.
  writeIndicatorFile(targetDir, indicatorFile, backupUser, backupGroup)
Writes an indicator file into a target directory.

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

Function Details

findDailyDirs(stagingDir, indicatorFile)

Returns a list of all daily staging directories that do not contain the indicated indicator file.
Parameters:
stagingDir - Configured staging directory (config.targetDir)
Returns:
List of absolute paths to daily staging directories.

getBackupFiles(targetDir)

Gets a list of backup files in a target directory.

Files that match INDICATOR_PATTERN (i.e. "cback.store", "cback.stage", etc.) are assumed to be indicator files and are ignored.
Parameters:
targetDir - Directory to look in
Returns:
List of backup files in the directory
Raises:
ValueError - If the target directory does not exist

writeIndicatorFile(targetDir, indicatorFile, backupUser, backupGroup)

Writes an indicator file into a target directory.
Parameters:
targetDir - Target directory in which to write indicator
indicatorFile - Name of the indicator file
backupUser - User that indicator file should be owned by
backupGroup - Group that indicator file should be owned by

Variable Details

logger

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

Generated by Epydoc 2.1 on Fri Feb 23 23:10:20 2007 http://epydoc.sf.net