Package ZenUtils :: Module ZenBackup :: Class ZenBackup
[hide private]
[frames] | no frames]

Class ZenBackup

source code

        CmdBase.CmdBase --+    
                          |    
ZenBackupBase.ZenBackupBase --+
                              |
                             ZenBackup

Instance Methods [hide private]
 
__init__(self) source code
 
runCommand(self, cmd=[], obfuscated_cmd=None)
Execute a command and return the results, displaying pre and post messages.
source code
boolean
isZeoUp(self)
Returns True if Zeo appears to be running, false otherwise.
source code
 
readSettingsFromZeo(self)
Store the dbname, dbuser, dbpass from saved settings in the Event Manager (ie ZODB) to the 'options' parsed object.
source code
 
saveSettings(self)
Save the database credentials to a file for use during restore.
source code
string
getPassArg(self)
Return string to be used as the -p (including the "-p") to MySQL commands.
source code
string
getDefaultBackupFile(self)
Return a name for the backup file or die trying.
source code
 
buildOptions(self)
Basic options setup
source code
 
backupEventsDatabase(self)
Backup the MySQL events database
source code
 
backupZODB(self)
Backup the Zope database.
source code
 
backupPerfData(self)
Back up the RRD files storing performance data.
source code
 
packageStagingBackups(self)
Gather all of the other data into one nice, neat file for easy tracking.
source code
 
cleanupTempDir(self)
Remove temporary files in staging directory.
source code
 
makeBackup(self)
Create a backup of the data and configuration for a Zenoss install.
source code

Inherited from ZenBackupBase.ZenBackupBase: getTempDir, msg

Inherited from CmdBase.CmdBase: buildParser, checkLogpath, generate_configs, generate_xml_configs, generate_xml_table, getConfigFileDefaults, parseOptions, pretty_print_config_comment, setupLogging

Class Variables [hide private]

Inherited from ZenBackupBase.ZenBackupBase: doesLogging

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: ZenBackupBase.ZenBackupBase.__init__

runCommand(self, cmd=[], obfuscated_cmd=None)

source code 
Execute a command and return the results, displaying pre and post messages.
Parameters:
  • cmd (list) - command to run
Returns:
results of the command (output, warnings, returncode)

isZeoUp(self)

source code 
Returns True if Zeo appears to be running, false otherwise.
Returns: boolean
whether Zeo is up or not

getPassArg(self)

source code 
Return string to be used as the -p (including the "-p") to MySQL commands. Overrides the one in ZenBackupBase
Returns: string
password and flag
Overrides: ZenBackupBase.ZenBackupBase.getPassArg

getDefaultBackupFile(self)

source code 
Return a name for the backup file or die trying.
Returns: string
unique name for a backup

buildOptions(self)

source code 
Basic options setup
Overrides: ZenBackupBase.ZenBackupBase.buildOptions