Conflicting timestamps in rsyncd.log
Bill Landry
bill at inetmsg.com
Mon Mar 2 02:09:29 GMT 2009
Eberhard Moenkeberg wrote:
> Hi,
>
> On Sun, 1 Mar 2009, Matt McCutchen wrote:
>> On Sun, 2009-03-01 at 17:21 -0800, Bill Landry wrote:
>
>>> I just setup my first rsyncd server and all is working well as far as
>>> file syncing goes. However, I am a bit baffled by the fact that some of
>>> the log entries in the rsyncd.log file are entered in local time and
>>> other are entered in GMT.
>> This happens because the chroot done by the rsync daemon prevents glibc
>> from reading /etc/localtime to determine the current timezone. I'm not
>> sure what is the "right" fix for this issue, but you can work around it
>> using the new chroot+chdir mode in rsync >= 3.0.0. E.g., configuration:
>>
>> [some-module]
>> use chroot = true
>> path = /path/to/chroot/./some-module
>>
>> Then copy /etc/localtime to /path/to/chroot/etc/localtime and put the
>> module data in /path/to/chroot/some-module. See also:
>>
>> https://bugzilla.samba.org/show_bug.cgi?id=4402
>
> A nice workaround, but not a solution.
> The daemon should get and export the timezone info before forking into
> the chroot environment.
Thanks for the reply, I could copy localtime into the chroot. I just
tried using a logging facility instead of a "log file" by changing the
logging in my rsyncd.conf to:
log format = %h %a %m (%u) %f
syslog facility = local3
and adding the following to my rsyslog.conf file:
local3.info /var/log/rsyncd.log
However, now the rsync logging is going into both /var/log/rsyncd.log
and /var/log/messages. If it's not one thing it's another. Is there a
way to only log rsync messages to /var/log/rsyncd.log and not to
/var/log/messages?
Thanks for any feedback!
Bill
More information about the rsync
mailing list