diff options
author | Reinhard Tartler <siretart@tauware.de> | 2009-04-02 13:58:11 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2009-04-02 13:58:11 +0200 |
commit | a84d45498bd861c9225080232948a99c2e317bb8 (patch) | |
tree | 8f1f5fb7bf7ffbf6f24cf4a4fd6888a235dbcc08 /lib/backupclient/BackupDaemonConfigVerify.cpp | |
parent | 25db897553a0db0f912602b375029e724f51556e (diff) |
Import upstream version 0.11~rc3~r2491
Diffstat (limited to 'lib/backupclient/BackupDaemonConfigVerify.cpp')
-rw-r--r-- | lib/backupclient/BackupDaemonConfigVerify.cpp | 97 |
1 files changed, 60 insertions, 37 deletions
diff --git a/lib/backupclient/BackupDaemonConfigVerify.cpp b/lib/backupclient/BackupDaemonConfigVerify.cpp index 61033b5b..e70ba865 100644 --- a/lib/backupclient/BackupDaemonConfigVerify.cpp +++ b/lib/backupclient/BackupDaemonConfigVerify.cpp @@ -17,15 +17,15 @@ static const ConfigurationVerifyKey backuplocationkeys[] = { - {"ExcludeFile", 0, ConfigTest_MultiValueAllowed, 0}, - {"ExcludeFilesRegex", 0, ConfigTest_MultiValueAllowed, 0}, - {"ExcludeDir", 0, ConfigTest_MultiValueAllowed, 0}, - {"ExcludeDirsRegex", 0, ConfigTest_MultiValueAllowed, 0}, - {"AlwaysIncludeFile", 0, ConfigTest_MultiValueAllowed, 0}, - {"AlwaysIncludeFilesRegex", 0, ConfigTest_MultiValueAllowed, 0}, - {"AlwaysIncludeDir", 0, ConfigTest_MultiValueAllowed, 0}, - {"AlwaysIncludeDirsRegex", 0, ConfigTest_MultiValueAllowed, 0}, - {"Path", 0, ConfigTest_Exists | ConfigTest_LastEntry, 0} + ConfigurationVerifyKey("ExcludeFile", ConfigTest_MultiValueAllowed), + ConfigurationVerifyKey("ExcludeFilesRegex", ConfigTest_MultiValueAllowed), + ConfigurationVerifyKey("ExcludeDir", ConfigTest_MultiValueAllowed), + ConfigurationVerifyKey("ExcludeDirsRegex", ConfigTest_MultiValueAllowed), + ConfigurationVerifyKey("AlwaysIncludeFile", ConfigTest_MultiValueAllowed), + ConfigurationVerifyKey("AlwaysIncludeFilesRegex", ConfigTest_MultiValueAllowed), + ConfigurationVerifyKey("AlwaysIncludeDir", ConfigTest_MultiValueAllowed), + ConfigurationVerifyKey("AlwaysIncludeDirsRegex", ConfigTest_MultiValueAllowed), + ConfigurationVerifyKey("Path", ConfigTest_Exists | ConfigTest_LastEntry) }; static const ConfigurationVerify backuplocations[] = @@ -64,39 +64,62 @@ static const ConfigurationVerify verifyserver[] = static const ConfigurationVerifyKey verifyrootkeys[] = { - {"AccountNumber", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, - - {"UpdateStoreInterval", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, - {"MinimumFileAge", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, - {"MaxUploadWait", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, - {"MaxFileTimeInFuture", "172800", ConfigTest_IsInt, 0}, // file is uploaded if the file is this much in the future (2 days default) - - {"AutomaticBackup", "yes", ConfigTest_IsBool, 0}, + ConfigurationVerifyKey("AccountNumber", + ConfigTest_Exists | ConfigTest_IsInt), + ConfigurationVerifyKey("UpdateStoreInterval", + ConfigTest_Exists | ConfigTest_IsInt), + ConfigurationVerifyKey("MinimumFileAge", + ConfigTest_Exists | ConfigTest_IsInt), + ConfigurationVerifyKey("MaxUploadWait", + ConfigTest_Exists | ConfigTest_IsInt), + ConfigurationVerifyKey("MaxFileTimeInFuture", ConfigTest_IsInt, 172800), + // file is uploaded if the file is this much in the future + // (2 days default) + ConfigurationVerifyKey("AutomaticBackup", ConfigTest_IsBool, true), - {"SyncAllowScript", 0, 0, 0}, // optional script to run to see if the sync should be started now - // return "now" if it's allowed, or a number of seconds if it's not + ConfigurationVerifyKey("SyncAllowScript", 0), + // script that returns "now" if backup is allowed now, or a number + // of seconds to wait before trying again if not - {"MaximumDiffingTime", 0, ConfigTest_IsInt, 0}, - {"DeleteRedundantLocationsAfter", "172800", ConfigTest_IsInt, 0}, + ConfigurationVerifyKey("MaximumDiffingTime", ConfigTest_IsInt), + ConfigurationVerifyKey("DeleteRedundantLocationsAfter", + ConfigTest_IsInt, 172800), - {"FileTrackingSizeThreshold", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, - {"DiffingUploadSizeThreshold", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, - {"StoreHostname", 0, ConfigTest_Exists, 0}, - {"ExtendedLogging", "no", ConfigTest_IsBool, 0}, // extended log to syslog - {"ExtendedLogFile", NULL, 0, 0}, // extended log to a file - {"LogAllFileAccess", "no", ConfigTest_IsBool, 0}, + ConfigurationVerifyKey("FileTrackingSizeThreshold", + ConfigTest_Exists | ConfigTest_IsInt), + ConfigurationVerifyKey("DiffingUploadSizeThreshold", + ConfigTest_Exists | ConfigTest_IsInt), + ConfigurationVerifyKey("StoreHostname", ConfigTest_Exists), + ConfigurationVerifyKey("StorePort", ConfigTest_IsInt, + BOX_PORT_BBSTORED), + ConfigurationVerifyKey("ExtendedLogging", ConfigTest_IsBool, false), + // extended log to syslog + ConfigurationVerifyKey("ExtendedLogFile", 0), + // extended log to a file + ConfigurationVerifyKey("LogAllFileAccess", ConfigTest_IsBool, false), + // enable logging reasons why each file is backed up or not + ConfigurationVerifyKey("LogFile", 0), + // enable logging to a file + ConfigurationVerifyKey("LogFileLevel", 0), + // set the level of verbosity of file logging + ConfigurationVerifyKey("CommandSocket", 0), + // not compulsory to have this + ConfigurationVerifyKey("KeepAliveTime", ConfigTest_IsInt), + ConfigurationVerifyKey("StoreObjectInfoFile", 0), + // optional - {"CommandSocket", 0, 0, 0}, // not compulsory to have this - {"KeepAliveTime", 0, ConfigTest_IsInt, 0}, // optional - {"StoreObjectInfoFile", 0, 0, 0}, // optional - - {"NotifyScript", 0, 0, 0}, // optional script to run when backup needs attention, eg store full + ConfigurationVerifyKey("NotifyScript", 0), + // optional script to run when backup needs attention, eg store full - {"CertificateFile", 0, ConfigTest_Exists, 0}, - {"PrivateKeyFile", 0, ConfigTest_Exists, 0}, - {"TrustedCAsFile", 0, ConfigTest_Exists, 0}, - {"KeysFile", 0, ConfigTest_Exists, 0}, - {"DataDirectory", 0, ConfigTest_Exists | ConfigTest_LastEntry, 0} + ConfigurationVerifyKey("NotifyAlways", ConfigTest_IsBool, false), + // option to disable the suppression of duplicate notifications + + ConfigurationVerifyKey("CertificateFile", ConfigTest_Exists), + ConfigurationVerifyKey("PrivateKeyFile", ConfigTest_Exists), + ConfigurationVerifyKey("TrustedCAsFile", ConfigTest_Exists), + ConfigurationVerifyKey("KeysFile", ConfigTest_Exists), + ConfigurationVerifyKey("DataDirectory", + ConfigTest_Exists | ConfigTest_LastEntry), }; const ConfigurationVerify BackupDaemonConfigVerify = |