[Box Backup] Parse Logfiles
Torsten Boob
boxbackup@fluffy.co.uk
Thu, 29 Mar 2007 22:11:39 +0200
--MP_UgOD38JGTnl01F+pbeNwjes
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi Chris,
i fixed some errors to use the changeset 1428 for BB 0.10.
It works fine, thank you. It runs NotifySysAdmin.sh on every error with
an undefined Error.
I attached the modified patch if anybody needs that.
Nice day
Torsten
> Hi Torsten,
>
> On Sat, 24 Mar 2007, Torsten Boob wrote:
>
> > thank you for your help.
> >
> > I tested the version from the svn. Its funny. With that version i do
> > not get an error on the client, but an error on the server:
> >
> > ... in server child, exception Connection TLSReadFailed (Probably a
> > network issue between client and server.) (7/34) -- terminating
> > child
> >
> > After that, the client dies.
>
> Sorry about that. Probably the error on the server was caused by the
> client dying. How did it die? Can you give me the last few lines of
> output or syslog messages from bbackupd?
>
> > Thank you for the patch for bb 0.10. But i think thats no solution
> > for me. The patch has nearly 30000 lines of changes and i think
> > 0.10 with such a patch can not be considered as stable anymore.
>
> I understand. You can also get a patch for this specific change from
> Subversion/Trac. View online here:
>
> http://bbdev.fluffy.co.uk/trac/changeset/1428
>
> and download a patch here:
>
> http://bbdev.fluffy.co.uk/trac/changeset/1428?format=diff&new=1428
>
> If you can apply it to BB 0.10, please feel free to test and let me
> know if you have any problems.
>
> > When will next version of bb with all that beautiful changes be
> > available ? :)
>
> Sorry, I have no idea, nobody has much time to review my changes any
> more, which is needed before they can be merged.
>
> In the mean time I'm encouraging people to try my merge tree and let
> me know how it goes. The more people test it, the easier it will be
> to persuade the other developers that my changes don't break anything
> and should be accepted.
>
> Testing will also help me to improve the quality by finding and
> fixing bugs like this one. I'm very interested to get feedback and to
> fix any bugs that are found in my trees.
>
> Cheers, Chris.
--MP_UgOD38JGTnl01F+pbeNwjes
Content-Type: text/x-patch; name=changeset_r1428_for_0.10.diff
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=changeset_r1428_for_0.10.diff
diff -u boxbackup-0.10_sarge/bin/bbackupd/BackupDaemon.cpp boxbackup-0.10_1428_changeset/bin/bbackupd/BackupDaemon.cpp
--- boxbackup-0.10_sarge/bin/bbackupd/BackupDaemon.cpp 2006-11-17 03:34:20.000000000 +0100
+++ boxbackup-0.10_1428_changeset/bin/bbackupd/BackupDaemon.cpp 2007-03-29 12:02:55.000000000 +0200
@@ -156,8 +156,8 @@
// Only ever one instance of a daemon
SSLLib::Initialise();
- // Initialise notifcation sent status
- for(int l = 0; l <= NotifyEvent__MAX; ++l)
+ // Initialise notification sent status
+ for(int l = 0; l < NotifyEvent__MAX; ++l)
{
mNotificationsSent[l] = false;
}
@@ -815,6 +815,8 @@
else
{
// Not restart/terminate, pause and retry
+ // Notify administrator
+ NotifySysadmin(NotifyEvent_BackupError);
SetState(State_Error);
::syslog(LOG_ERR,
"Exception caught (%s %d/%d), "
@@ -1860,11 +1862,17 @@
// --------------------------------------------------------------------------
void BackupDaemon::NotifySysadmin(int Event)
{
- static const char *sEventNames[] = {"store-full", "read-error", 0};
+ static const char *sEventNames[] =
+ {
+ "store-full",
+ "read-error",
+ "backup-error",
+ 0
+ };
TRACE1("BackupDaemon::NotifySysadmin() called, event = %d\n", Event);
- if(Event < 0 || Event > NotifyEvent__MAX)
+ if(Event < 0 || Event >= NotifyEvent__MAX)
{
THROW_EXCEPTION(BackupStoreException, BadNotifySysadminEventCode);
}
Nur in boxbackup-0.10_1428_changeset/bin/bbackupd/: BackupDaemon.cpp.orig.
Nur in boxbackup-0.10_1428_changeset/bin/bbackupd/: BackupDaemon.cpp.rej.
diff -u boxbackup-0.10_sarge/bin/bbackupd/BackupDaemon.h boxbackup-0.10_1428_changeset/bin/bbackupd/BackupDaemon.h
--- boxbackup-0.10_sarge/bin/bbackupd/BackupDaemon.h 2006-11-17 03:34:20.000000000 +0100
+++ boxbackup-0.10_1428_changeset/bin/bbackupd/BackupDaemon.h 2007-03-29 12:00:42.000000000 +0200
@@ -114,8 +114,9 @@
enum
{
NotifyEvent_StoreFull = 0,
- NotifyEvent_ReadError = 1,
- NotifyEvent__MAX = 1
+ NotifyEvent_ReadError,
+ NotifyEvent_BackupError,
+ NotifyEvent__MAX
// When adding notifications, remember to add strings to NotifySysadmin()
};
void NotifySysadmin(int Event);
@@ -209,7 +210,7 @@
CommandSocketInfo *mpCommandSocketInfo;
// Stop notifications being repeated.
- bool mNotificationsSent[NotifyEvent__MAX + 1];
+ bool mNotificationsSent[NotifyEvent__MAX];
// Unused entries in the root directory wait a while before being deleted
box_time_t mDeleteUnusedRootDirEntriesAfter; // time to delete them
--MP_UgOD38JGTnl01F+pbeNwjes--