BackupPC-users

Re: [BackupPC-users] BackupPC not recording DumpPreUserCmd in XferLOG if non-zero exit is not ignored.

2009-02-25 03:17:57
Subject: Re: [BackupPC-users] BackupPC not recording DumpPreUserCmd in XferLOG if non-zero exit is not ignored.
From: Craig Barratt <cbarratt AT users.sourceforge DOT net>
To: John Rouillard <rouilj-backuppc AT renesys DOT com>
Date: Wed, 25 Feb 2009 00:14:08 -0800
John writes:

> Can anybody confirm that xferlogs are not being written if
> DumpPreUserCmd exits non-zero with $Conf{UserCmdCheckStatus} = 1? Also
> does anybody know if it is fixed in a subsequent release?

Yes, this looks like a bug.  An error will be written to the per-client
LOG file.  But in this case the XferLOG file isn't closed before exit,
so the cached compressed data isn't written, nor is the file renamed to
XferLOG.bad.z.  So as you noticed you just have an empty XferLOG.z file.

It's very easy to fix... in BackupPC_dump just call BackupFailCleanup()
instead of exit(1) in the cases where DumpPreUserCmd (or any *UserCmd)
fails.

Craig

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/