Re: sync localized directories (with different names)

Greg Troxel <[email protected]> Sun, 28 Apr 2024 11:05:43 -0400
Newsgroups gmane.network.unison.general
Message-ID <[email protected]>
"'Joel Carnat' via unison-users" <[email protected]> writes:

> I want to synchronize my Documents/Downloads/Pictures/... folders on
> various (Linux/OpenBSD) machines that use different $LANG value. The
> central server and some workstations use LANG="us_US.UTF8". Some other
> workstations use LANG="fr_FR.UTF8". Depending on the $LANG variable,
> folders have different names.

Have you considered symlinks from names in a standard namespace?  (or
putting the files there and symlinking the localized names?)

> This means, for such workstations, I need one profile per directory
> and I couldn't find how to write a big profile that would sync all
> directories at once.

I am not aware of a way to do this.

> Is there a way to implement some kind of corresponding table that
> would allow synchronizing the whole sets of localized directories at
> once?

One could surely write code to do this but it would be a fair bit of
work.  You'd want to split root in to root/path and then have a set of
path pairs, and expand the wire protocol.  Or more likely to have some
sort of pathmap to translate remote path namespace to local.  So far
unison hasn't gone too far down the sync/transform path.

You could write a macro processor to generate a bunch of profiles and
then just run multiple unisons.  I guess that's what you are doing now.

Have you looked at other synchronization programs to see if they
implement this, how, and what the issues are?  Specifically these
situations:

  homedir is on NFS or some other remote-access filesystem
  rsync
  syncthing

I don't know of any such mechanisms for those programs.  But I don't
differently-localize directory names so I haven't looked.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].