Home | Trees | Indices | Help |
|
---|
|
Implements action-related utilities
Author: Kenneth J. Pronovici <pronovic@ieee.org>
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
logger = logging.getLogger("CedarBackup2.log.actions.util")
|
|||
MEDIA_LABEL_PREFIX =
|
|||
__package__ =
|
|
Returns a list of all daily staging directories that do not contain the indicated indicator file.
|
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 This function also checks to make sure that the device isn't mounted before creating a writer object for it. Experience shows that sometimes if the device is mounted, we have problems with the backup. We may as well do the check here first, before instantiating the writer.
|
Writes an indicator file into a target directory.
|
Gets a list of backup files in a target directory. Files that match INDICATOR_PATTERN (i.e.
|
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 a
|
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.
Note: Only rewritable media (CD-RW, DVD+RW) can be initialized. It doesn't make any sense to initialize media that cannot be rewritten (CD-R, DVD+R), since Cedar Backup would then not be able to use that media for a backup. |
Builds a media label to be used on Cedar Backup media.
|
Gets the device type that should be used for storing. Use the configured device type if not
|
Gets the media type that should be used for storing. Use the configured media type if not Once we figure out what configuration value to use, we return a media type value that is valid in one of the supported writers: MEDIA_CDR_74 MEDIA_CDRW_74 MEDIA_CDR_80 MEDIA_CDRW_80 MEDIA_DVDPLUSR MEDIA_DVDPLUSRW
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Jan 5 14:52:04 2015 | http://epydoc.sourceforge.net |