Home | Trees | Index | Help |
|
---|
Package CedarBackup2 :: Package actions :: Module util |
|
Author: Kenneth J. Pronovici <pronovic@ieee.org>
Function Summary | |
---|---|
Returns a list of all daily staging directories that do not contain the indicated indicator file. | |
Builds a media label to be used on Cedar Backup media. | |
Checks state of the media in the backup device to confirm whether it has been initialized for use with Cedar Backup. | |
Creates a writer object based on current configuration. | |
Gets a list of backup files in a target directory. | |
Initializes state of the media in the backup device so Cedar Backup can recognize it. | |
Writes an indicator file into a target directory. | |
Gets the device type that should be used for storing. | |
Gets the media type that should be used for storing. |
Variable Summary | |
---|---|
Logger |
logger = <logging.Logger instance at 0x402da5ac>
|
str |
MEDIA_LABEL_PREFIX = 'CEDAR BACKUP'
|
Function Details |
---|
findDailyDirs(stagingDir, indicatorFile)Returns a list of all daily staging directories that do not contain the indicated indicator file.
|
buildMediaLabel()Builds a media label to be used on Cedar Backup media.
|
checkMediaState(storeConfig)Checks state of the media in the backup device to confirm whether it has been initialized for use with Cedar Backup. We can tell whether the media has been initialized by looking at its media label. If the media label starts with MEDIA_LABEL_PREFIX, then it has been initialized. The check varies depending on whether the media is rewritable or not. For non-rewritable media, we also accept aNone media
label, since this kind of media cannot safely be initialized.
|
createWriter(config)Creates a writer object based on current configuration. This function creates and returns a writer based on configuration. This is done to abstract action functionality from knowing what kind of writer is in use. Since all writers implement the same interface, there's no need for actions to care which one they're working with. Currently, the
|
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.
|
initializeMediaState(config)Initializes state of the media in the backup device so Cedar Backup can recognize it. This is done by writing an mostly-empty image (it contains a "Cedar Backup" directory) to the media with a known media label.
|
writeIndicatorFile(targetDir, indicatorFile, backupUser, backupGroup)Writes an indicator file into a target directory.
|
_getDeviceType(config)Gets the device type that should be used for storing. Use the configured device type if notNone , otherwise
use config.DEFAULT_DEVICE_TYPE .
|
_getMediaType(config)Gets the media type that should be used for storing. Use the configured media type if not MEDIA_CDR_74 MEDIA_CDRW_74 MEDIA_CDR_80 MEDIA_CDRW_80 MEDIA_DVDPLUSR MEDIA_DVDPLUSRW
|
Variable Details |
---|
logger
|
MEDIA_LABEL_PREFIX
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Mar 29 20:58:25 2007 | http://epydoc.sf.net |