[Box Backup] Boxi loses settings from bbackupd.conf

Achim achim+box at qustodium.net
Tue Sep 13 00:03:17 BST 2011


Hello list:

I am happy to share with you that I solved the issue I outline last
month:

On Sun, 14 Aug 2011 20:16:18 +0200, Achim <achim+box at qustodium.net>
wrote:
> Boxi loses the following settings from an existing bbackupd.conf
> configuration file when overwriting it with an updated version (edited
> through the GUI itself):
> 
> StorePort =
> LogAllFileAccess =
> LogFileLevel =
> LogFile =
> NotifyAlways =
> ExtendedLogFile =
> MaxUploadRate =
> DeleteRedundantLocationsAfter =
> 
> Some of those settings are somewhat more recent (MaxUploadRate and
> DeleteRedundantLocationsAfter).

Please apply the enclosed patches, they will update src/ClientConfig.cc
and include/Property.h to include all settings. Loading and saving now
keeps the existing values. Next step: expose them in the GUI?

Chris, could you please include this fix in the SVN version?

> And what was the reason in the first place to have Boxi re-create a
> completely new bbackupd.conf (overwriting the old one and losing all
> comments at the same time), instead of just updating the values in
> place (or, alternatively, make a new copy of existing bbackupd.conf,
> update values, overwrite existing bbackupd.conf with new copy in an
> atomic operation)?

This is still an open question: is there a simple way to update the
existing file, rather than re-creating a new one upon saving?

Best regards, Achim
-------------- next part --------------
--- ../../boxi_svn_i18n_new_ui/src/ClientConfig.cc      2011-07-05 22:23:14.5492
52800 +0200
+++ ClientConfig.cc     2011-09-13 00:40:24.615198400 +0200
@@ -69,6 +69,14 @@
        INIT_PROP(MaxFileTimeInFuture,        0), \
        INIT_PROP_EMPTY(KeepAliveTime), \
        INIT_PROP(ExtendedLogging, false), \
+       INIT_PROP(StorePort,                  2201), \
+       INIT_PROP(LogAllFileAccess, true), \
+       INIT_PROP(LogFileLevel, "notice"), \
+       INIT_PROP_EMPTY(LogFile), \
+       INIT_PROP(NotifyAlways, true), \
+       INIT_PROP_EMPTY(ExtendedLogFile), \
+       INIT_PROP(MaxUploadRate,              0), \
+       INIT_PROP(DeleteRedundantLocationsAfter, 0), \
        INIT_PROP(AutomaticBackup, true)

 ClientConfig::ClientConfig()
@@ -510,6 +518,14 @@
        WRITE_INT_PROP(KeepAliveTime)

        WRITE_BOOL_PROP(ExtendedLogging)
+       WRITE_INT_PROP(StorePort)
+       WRITE_BOOL_PROP(LogAllFileAccess)
+       WRITE_STR_PROP(LogFileLevel)
+       WRITE_DIR_PROP(LogFile)
+       WRITE_BOOL_PROP(NotifyAlways)
+       WRITE_DIR_PROP(ExtendedLogFile)
+       WRITE_INT_PROP(MaxUploadRate)
+       WRITE_INT_PROP(DeleteRedundantLocationsAfter)
        WRITE_BOOL_PROP(AutomaticBackup)

        #undef WRITE_STR_PROP
-------------- next part --------------
--- ../../boxi_svn_i18n_new_ui/include/Property.h       2011-07-05 22:23:47.8471
32800 +0200
+++ Property.h  2011-09-13 00:36:58.959480000 +0200
@@ -42,6 +42,9 @@
 STR_PROP(SyncAllowScript) \
 STR_PROP(CommandSocket) \
 STR_PROP_SUBCONF(PidFile, Server) \
+STR_PROP(LogFileLevel) \
+STR_PROP(LogFile) \
+STR_PROP(ExtendedLogFile) \
 STR_PROP(StoreObjectInfoFile)

 #define INT_PROPS \
@@ -53,10 +56,15 @@
 INT_PROP(DiffingUploadSizeThreshold) \
 INT_PROP(MaximumDiffingTime) \
 INT_PROP(MaxFileTimeInFuture) \
+INT_PROP(StorePort) \
+INT_PROP(MaxUploadRate) \
+INT_PROP(DeleteRedundantLocationsAfter) \
 INT_PROP(KeepAliveTime)

 #define BOOL_PROPS \
 BOOL_PROP(ExtendedLogging) \
+BOOL_PROP(LogAllFileAccess) \
+BOOL_PROP(NotifyAlways) \
 BOOL_PROP(AutomaticBackup)

 #define ALL_PROPS STR_PROPS INT_PROPS BOOL_PROPS


More information about the Boxbackup mailing list