| Home | Trees | Index | Help |
|
|---|
| Package CedarBackup2 :: Package extend :: Module encrypt |
|
Provides an extension to encrypt staging directories.
When this extension is executed, all backed-up files in the configured
Cedar Backup staging directory will be encrypted using gpg. Any directory
which has already been encrypted (as indicated by the
cback.encrypt file) will be ignored.
Author: Kenneth J. Pronovici <pronovic@ieee.org>
| Classes | |
|---|---|
EncryptConfig |
Class representing encrypt configuration. |
LocalConfig |
Class representing this extension's configuration document. |
| Function Summary | |
|---|---|
Executes the encrypt backup action. | |
Confirms that a recipient's public key is known to GPG. | |
Encrypts the contents of a daily staging directory. | |
Encrypts the source file using the indicated mode. | |
Encrypts the indicated source file using GPG. | |
Returns a list of all daily staging directories that have not yet been encrypted. | |
Writes the encrypt indicator file into a daily staging directory. | |
| Variable Summary | |
|---|---|
str |
ENCRYPT_INDICATOR = 'cback.encrypt'
|
list |
GPG_COMMAND = ['gpg']
|
list |
INDICATOR_PATTERNS = ['cback\\..*']
|
Logger |
logger = <logging.Logger instance at 0x402f0e8c>
|
list |
VALID_ENCRYPT_MODES = ['gpg']
|
| Function Details |
|---|
executeAction(configPath, options, config)Executes the encrypt backup action.
|
_confirmGpgRecipient(recipient)Confirms that a recipient's public key is known to GPG. Throws an exception if there is a problem, or returns normally otherwise.
|
_encryptDailyDir(dailyDir, encryptMode, encryptTarget, backupUser, backupGroup)Encrypts the contents of a daily staging directory. Files that match INDICATOR_PATTERNS (i.e.
"gpg".
|
_encryptFile(sourcePath, encryptMode, encryptTarget, backupUser, backupGroup, removeSource=False)Encrypts the source file using the indicated mode. The encrypted file will be owned by the indicated backup user and
group. If "gpg" encrypt mode is
supported.
|
_encryptFileWithGpg(sourcePath, recipient)Encrypts the indicated source file using GPG. The encrypted file will be in GPG's binary output format and will have the same name as the source file plus a".gpg" extension. The source file will not be
modified or removed by this function call.
|
_findDailyDirs(stagingDir)Returns a list of all daily staging directories that have not yet been encrypted. The encrypt indicator filecback.encrypt will be
written to a daily staging directory once that directory is encrypted.
So, this function looks at each daily staging directory within the
configured staging directory, and returns a list of those which do not
contain the indicator file.
|
_writeIndicator(dailyDir, backupUser, backupGroup)Writes the encrypt indicator file into a daily staging directory.
|
| Variable Details |
|---|
ENCRYPT_INDICATOR
|
GPG_COMMAND
|
INDICATOR_PATTERNS
|
logger
|
VALID_ENCRYPT_MODES
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Tue Jan 30 23:16:58 2007 | http://epydoc.sf.net |