Ignore:
Timestamp:
28/03/2008 22:59:28 (4 years ago)
Author:
chris
Message:

Allow configuration of the server port that the client will connect to
(bbackupd and bbackupquery).

Redesign ConfigurationVerify? to use classes instead of structs.

Use port 22011 instead of 2201 during tests, to reduce the chances of
conflicting with a running bbstored or other process.

Ignore autogen_* in svn:ignore everywhere instead of individual per-file
ignores.

Location:
box/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • box/trunk

    • Property svn:ignore
      •  

        old new  
        1111release 
        1212runtest.pl 
         13.hg 
  • box/trunk/lib/backupclient

    • Property svn:ignore
      •  

        old new  
        1 autogen_BackupProtocolClient.cpp 
        2 autogen_BackupProtocolClient.h 
        3 autogen_BackupStoreException.cpp 
        4 autogen_BackupStoreException.h 
         1autogen_* 
        52Makefile 
  • box/trunk/lib/backupclient/BackupDaemonConfigVerify.cpp

    r1863 r2116  
    1818static const ConfigurationVerifyKey backuplocationkeys[] =  
    1919{ 
    20         {"ExcludeFile", 0, ConfigTest_MultiValueAllowed, 0}, 
    21         {"ExcludeFilesRegex", 0, ConfigTest_MultiValueAllowed, 0}, 
    22         {"ExcludeDir", 0, ConfigTest_MultiValueAllowed, 0}, 
    23         {"ExcludeDirsRegex", 0, ConfigTest_MultiValueAllowed, 0}, 
    24         {"AlwaysIncludeFile", 0, ConfigTest_MultiValueAllowed, 0}, 
    25         {"AlwaysIncludeFilesRegex", 0, ConfigTest_MultiValueAllowed, 0}, 
    26         {"AlwaysIncludeDir", 0, ConfigTest_MultiValueAllowed, 0}, 
    27         {"AlwaysIncludeDirsRegex", 0, ConfigTest_MultiValueAllowed, 0}, 
    28         {"Path", 0, ConfigTest_Exists | ConfigTest_LastEntry, 0} 
     20        ConfigurationVerifyKey("ExcludeFile", ConfigTest_MultiValueAllowed), 
     21        ConfigurationVerifyKey("ExcludeFilesRegex", ConfigTest_MultiValueAllowed), 
     22        ConfigurationVerifyKey("ExcludeDir", ConfigTest_MultiValueAllowed), 
     23        ConfigurationVerifyKey("ExcludeDirsRegex", ConfigTest_MultiValueAllowed), 
     24        ConfigurationVerifyKey("AlwaysIncludeFile", ConfigTest_MultiValueAllowed), 
     25        ConfigurationVerifyKey("AlwaysIncludeFilesRegex", ConfigTest_MultiValueAllowed), 
     26        ConfigurationVerifyKey("AlwaysIncludeDir", ConfigTest_MultiValueAllowed), 
     27        ConfigurationVerifyKey("AlwaysIncludeDirsRegex", ConfigTest_MultiValueAllowed), 
     28        ConfigurationVerifyKey("Path", ConfigTest_Exists | ConfigTest_LastEntry) 
    2929}; 
    3030 
     
    6565static const ConfigurationVerifyKey verifyrootkeys[] =  
    6666{ 
    67         {"AccountNumber", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
     67        ConfigurationVerifyKey("AccountNumber", 
     68                ConfigTest_Exists | ConfigTest_IsInt), 
     69        ConfigurationVerifyKey("UpdateStoreInterval", 
     70                ConfigTest_Exists | ConfigTest_IsInt), 
     71        ConfigurationVerifyKey("MinimumFileAge", 
     72                ConfigTest_Exists | ConfigTest_IsInt), 
     73        ConfigurationVerifyKey("MaxUploadWait", 
     74                ConfigTest_Exists | ConfigTest_IsInt), 
     75        ConfigurationVerifyKey("MaxFileTimeInFuture", ConfigTest_IsInt, 172800), 
     76        // file is uploaded if the file is this much in the future 
     77        // (2 days default) 
     78        ConfigurationVerifyKey("AutomaticBackup", ConfigTest_IsBool, true), 
     79         
     80        ConfigurationVerifyKey("SyncAllowScript", 0), 
     81        // script that returns "now" if backup is allowed now, or a number 
     82        // of seconds to wait before trying again if not 
    6883 
    69         {"UpdateStoreInterval", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    70         {"MinimumFileAge", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    71         {"MaxUploadWait", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    72         {"MaxFileTimeInFuture", "172800", ConfigTest_IsInt, 0},         // file is uploaded if the file is this much in the future (2 days default) 
     84        ConfigurationVerifyKey("MaximumDiffingTime", ConfigTest_IsInt), 
     85        ConfigurationVerifyKey("DeleteRedundantLocationsAfter", 
     86                ConfigTest_IsInt, 172800), 
    7387 
    74         {"AutomaticBackup", "yes", ConfigTest_IsBool, 0}, 
     88        ConfigurationVerifyKey("FileTrackingSizeThreshold",  
     89                ConfigTest_Exists | ConfigTest_IsInt), 
     90        ConfigurationVerifyKey("DiffingUploadSizeThreshold", 
     91                ConfigTest_Exists | ConfigTest_IsInt), 
     92        ConfigurationVerifyKey("StoreHostname", ConfigTest_Exists), 
     93        ConfigurationVerifyKey("StorePort", ConfigTest_IsInt, 
     94                BOX_PORT_BBSTORED), 
     95        ConfigurationVerifyKey("ExtendedLogging", ConfigTest_IsBool, false), 
     96        // extended log to syslog 
     97        ConfigurationVerifyKey("ExtendedLogFile", 0), 
     98        // extended log to a file 
     99        ConfigurationVerifyKey("LogAllFileAccess", ConfigTest_IsBool, false), 
     100        ConfigurationVerifyKey("CommandSocket", 0), 
     101        // not compulsory to have this 
     102        ConfigurationVerifyKey("KeepAliveTime", ConfigTest_IsInt), 
     103        ConfigurationVerifyKey("StoreObjectInfoFile", 0), 
     104        // optional 
     105 
     106        ConfigurationVerifyKey("NotifyScript", 0), 
     107        // optional script to run when backup needs attention, eg store full 
    75108         
    76         {"SyncAllowScript", 0, 0, 0},                   // optional script to run to see if the sync should be started now 
    77                                 // return "now" if it's allowed, or a number of seconds if it's not 
    78  
    79         {"MaximumDiffingTime", 0, ConfigTest_IsInt, 0}, 
    80         {"DeleteRedundantLocationsAfter", "172800", ConfigTest_IsInt, 0}, 
    81  
    82         {"FileTrackingSizeThreshold", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    83         {"DiffingUploadSizeThreshold", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    84         {"StoreHostname", 0, ConfigTest_Exists, 0}, 
    85         {"ExtendedLogging",     "no", ConfigTest_IsBool, 0}, // extended log to syslog 
    86         {"ExtendedLogFile",     NULL, 0, 0}, // extended log to a file 
    87         {"LogAllFileAccess", "no", ConfigTest_IsBool, 0}, 
    88  
    89         {"CommandSocket", 0, 0, 0},                             // not compulsory to have this 
    90         {"KeepAliveTime", 0, ConfigTest_IsInt, 0},                              // optional 
    91         {"StoreObjectInfoFile", 0, 0, 0},                               // optional 
    92  
    93         {"NotifyScript", 0, 0, 0},                              // optional script to run when backup needs attention, eg store full 
    94          
    95         {"CertificateFile", 0, ConfigTest_Exists, 0}, 
    96         {"PrivateKeyFile", 0, ConfigTest_Exists, 0}, 
    97         {"TrustedCAsFile", 0, ConfigTest_Exists, 0}, 
    98         {"KeysFile", 0, ConfigTest_Exists, 0}, 
    99         {"DataDirectory", 0, ConfigTest_Exists | ConfigTest_LastEntry, 0} 
     109        ConfigurationVerifyKey("CertificateFile", ConfigTest_Exists), 
     110        ConfigurationVerifyKey("PrivateKeyFile", ConfigTest_Exists), 
     111        ConfigurationVerifyKey("TrustedCAsFile", ConfigTest_Exists), 
     112        ConfigurationVerifyKey("KeysFile", ConfigTest_Exists), 
     113        ConfigurationVerifyKey("DataDirectory",  
     114                ConfigTest_Exists | ConfigTest_LastEntry), 
    100115}; 
    101116 
Note: See TracChangeset for help on using the changeset viewer.