transfer logging -- absolute file path?

Alan Sparks asparks at doublesparks.net
Mon Jun 12 15:37:43 GMT 2006


Wayne Davison said:
> On Thu, Jun 08, 2006 at 02:58:17PM -0600, Alan Sparks wrote:
>> I have been experimenting with the transfer log facility, and while that
>> can provide the module path, and the base filename, it appears to
>> exclude
>> any sub-path information for the file.
>
> This seems to be a bug.  The %f log-format escape provides the full path
> within the module when sending files, but does not when receiving files.
> I'll look into fixing this, but in the meantime, my only suggestion is
> to use a "pre-xfer exec" program and have it log the args that it
> receives (which will let you prepend the destination dir manually).

Thanks.  Would appreciate feedback on a fix.  I see in the code for the
log_formatted() function the filename is special-cased if rsync is sending
the file, but do not understand why this should be special-cased.

I did not want to use the pre-xfer exec, as it's too early (I need to run
after the file is transferred successfully).  Unfortunately, the path info
is not included in the post-xfer exec environment (very unfortunate).
-Alan


===========
Alan Sparks, UNIX/Linux Systems Administrator    <asparks at doublesparks.net>



More information about the rsync mailing list