Re: sync localized directories (with different names)
"'Joel Carnat' via unison-users" <[email protected]> Sun, 28 Apr 2024 17:26:05 +0200
| Newsgroups | gmane.network.unison.general |
|---|---|
| Message-ID | <[email protected]> |
Le 28/04/2024 à 17:05, Greg Troxel a écrit : > "'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?) Yes, that's a thing I would end up doing if there are no other solutions. I just thought I may have missed something in the documentation I read :) >> 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. > I'm using rsync for other purposes and I manage the sync by using variable shell array to implement the corresponding table. Looking at a Syncthing tutorial video, it seems you can set a specific "Folder Path" for a dedicated "Folder". In the example I watched, the person was syncing his Windows Documents folder with a Ubuntu folder named syncDocuments ; which is barely what I would like to achieve. But as I'd rather keep using Unison rather than switching tool, I can go for the local symlinks trick. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].