Logging and chroot

Tobias Klausmann klausman at schwarzvogel.de
Wed Oct 13 14:36:40 GMT 2004


Hi!

I'm running a public rsync server (part of the gentoo rsync
mirror hierarchy). As for configuration, rsyncd runs standalone
with chrooting, offering two modules. After updating to 2.6.3 I
noticed something odd in my log files: the time stamps seemed way
out of sync.

After a little digging (and changing the rsync code to include
the time zone in the timestamp) I found out that different
messages use different time zones:

2004/10/13 11:06:06-CEST [8470] rsyncd version 2.6.3 starting, ...
2004/10/13 11:06:16-CEST [8473] rsync on gentoo-portage//metada...
2004/10/13 09:06:16-UTC [8473] wrote 501 bytes  read 192 bytes ...
2004/10/13 11:06:17-CEST [8474] rsync on gentoo-portage// ...
2004/10/13 09:06:23-UTC [8474] wrote 2307005 bytes  read ...

(lines shortened for readability)

A little thinking tells me that the "wrote" lines are generated
by the chroot()ed process which has no access to /etc/localtime. 

What can I do have both chroot()ing and consistent timestamps?
Creating etc/localtime in the chroot environment looks very ugly
to me. And I wonder how this used to work with 2.6.0. Others I as
asked report that 2.6.1 has consistent timestamps, too.

Regards,
Tobias

-- 
export DISPLAY=vt100


More information about the rsync mailing list