[Csync2] csync2 not syncing symlinks?!
Wolfram Schlich
lists at wolfram.schlich.org
Thu Feb 21 16:37:00 CET 2008
Hi Lars!
Thanks for your quick response.
* Lars Ellenberg <lars.ellenberg at linbit.com> [2008-02-21 15:58]:
> On Thu, Feb 21, 2008 at 03:10:47PM +0100, Wolfram Schlich wrote:
> > Hi,
> >
> > it seems that csync2 is just not syncing symlinks.
> > Is that true?
> > If yes, why the heck...?! :)
> >
> > Scenario:
> > - /etc/csync2/csync2.cfg: include /usr/lib/something;
> > - /usr/lib is a symlink to /usr/lib64
> > - csync2 does not sync /usr/lib/something
> > [...]
> > When I change csync2.cfg to 'include /usr/lib64/something;',
> > it *does* sync that file.
> >
> > The observed behaviour really sucks... :(
> > Are there plans to change this?
>
> not at all.
> works as designed.
> of course it is syncing symlinks.
>
> what you complain about is that it does not _follow_ symlinks,
> when you configure them in your config file.
Hmmkay...
> well, the problem is, it cannot do both, sync symlinks and follow them
> in the config file during directory traversal.
>
> the intended behaviour is
>
> /etc/someconfig-file is symlink to /etc/someconfig-file.version1
>
> in csync2.cfg, there is
> include /etc/someconfig-file;
> (and, obviously, someconfig-file.version1, version2, version3)
>
> you want to switch configs, you do change the symlink on one box,
> and sync that change, and csync2 will let the symlink point to that
> other file on all other boxes.
>
> ln -sf /etc/someconfig-file.version2 /etc/someconfig-file
> csync2 -xv /etc/someconfig-file
Well, I fail to understand why it shouldn't be *technically possible*
to resolve paths with symlinked components during directory traversal.
When I tell it to sync /usr/symlink/foo, why should it not be able to
follow /usr/symlink/foo to /usr/real/foo on the local side and sync
that exact file to /usr/symlink/foo on the remote side, no matter whether,
on the remote side, /usr/symlink exists as a symlink and whereever it
points to or whether it exists at all (if it doesn't exist, just
create it as a directory with the permissions of the symlink target on
the local side)...
Ok, that was just an idea, but probably not the sanest one.
I see it's not easy to handle correctly or if it's reasonable to
try it at all.
A big fat notice in the csync2.cfg documentation would be the minimum
improvement though (and the documentation as a whole is... well, not
optimal, to say the least :>).
Thanks for the headsup!
--
Regards,
Wolfram Schlich <wschlich at gentoo.org>
Gentoo Linux * http://dev.gentoo.org/~wschlich/
More information about the Csync2
mailing list