Gionata Boccalini
2015-Jun-07 16:38 UTC
Question on folder sync with "directory name translation"
Hello everyone, I'm new to this mailing list but I have been using rsync for some years up to now. I'm trying to synchronize two directory trees, but I want a special behavior that I didn't find on the net nor in the manual (or maybe there is a combination of options to get what I want but I couldn't find it). Tree A is like: A * * FolderA * * And tree B (on a remote filesystem) is like: B * * * FolderB * * I have to synchronize everything in one rsync run, like rysnc -arv A/ B/ but I want FolderA to be synchronized with FolderB. They must contain the same files but have a different name! I want something like a "directory name translation" in the rsync run... Is it possible? Do you see any another way of doing this? (A part of using two rsync runs....) Please let me know if I didn't explain the problem correctly or you need further information. Thank you for your attention and time. Best regards. *_______________Gionata Boccalini* -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20150607/3f8ca25c/attachment.html>
I'm sure one of the experts will have a better answer, but two things come to mind as options to explore: 1) Use --fuzzy twice so files which are the same but possibly with different names and locations are synced 2) Use some sort of symlinks on the destination so the names actually match (these could be added and removed right before and after the rsync respectively if you don't want them around later.) Symlinks are tricky with rsync. You have to set the options right, so I'm not sure of the exact details. On 06/07/2015 12:38 PM, Gionata Boccalini wrote:> Hello everyone, > > I'm new to this mailing list but I have been using rsync for some > years up to now. > I'm trying to synchronize two directory trees, but I want a special > behavior that I didn't find on the net nor in the manual (or maybe > there is a combination of options to get what I want but I couldn't > find it). > > Tree A is like: > > A > * > * > FolderA > * > * > > And tree B (on a remote filesystem) is like: > > B > * > * > * > FolderB > * > * > > > I have to synchronize everything in one rsync run, like > rysnc -arv A/ B/ > > but I want FolderA to be synchronized with FolderB. > They must contain the same files but have a different name! I want > something like a "directory name translation" in the rsync run... > Is it possible? Do you see any another way of doing this? (A part of > using two rsync runs....) > Please let me know if I didn't explain the problem correctly or you > need further information. > Thank you for your attention and time. > Best regards. > /_______________ > > Gionata Boccalini/ > >
Gionata Boccalini
2015-Jun-08 19:40 UTC
Question on folder sync with "directory name translation"
Thanks Joe for the reply: 1) why do you say to use fuzzy twice? Do you mean in both directions? 2) I have to mention that the remote system is a Synology NAS, which for whatever reason (I can't think about), doesn't support symlinks, even in the same disk volume or "share"!> But I could make some symlinks in the local system (archlinux) and user > exclude filters to remove the directories I don't want to synchronize. >But still there is no way of doing this with rsync options alone? *_______________Gionata Boccalini* 2015-06-07 19:28 GMT+02:00 Joe <josephj at main.nc.us>:> I'm sure one of the experts will have a better answer, but two things come > to mind as options to explore: > 1) Use --fuzzy twice so files which are the same but possibly with > different names and locations are synced > 2) Use some sort of symlinks on the destination so the names actually > match (these could be added and removed right before and after the rsync > respectively if you don't want them around later.) Symlinks are tricky with > rsync. You have to set the options right, so I'm not sure of the exact > details. > > > On 06/07/2015 12:38 PM, Gionata Boccalini wrote: > >> Hello everyone, >> >> I'm new to this mailing list but I have been using rsync for some years >> up to now. >> I'm trying to synchronize two directory trees, but I want a special >> behavior that I didn't find on the net nor in the manual (or maybe there is >> a combination of options to get what I want but I couldn't find it). >> >> Tree A is like: >> >> A >> * >> * >> FolderA >> * >> * >> >> And tree B (on a remote filesystem) is like: >> >> B >> * >> * >> * >> FolderB >> * >> * >> >> >> I have to synchronize everything in one rsync run, like >> rysnc -arv A/ B/ >> >> but I want FolderA to be synchronized with FolderB. >> They must contain the same files but have a different name! I want >> something like a "directory name translation" in the rsync run... >> Is it possible? Do you see any another way of doing this? (A part of >> using two rsync runs....) >> Please let me know if I didn't explain the problem correctly or you need >> further information. >> Thank you for your attention and time. >> Best regards. >> /_______________ >> >> Gionata Boccalini/ >> >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20150608/a3ad3d12/attachment.html>
Charles Marcus
2015-Jun-09 12:23 UTC
Question on folder sync with "directory name translation"
Hello, I've been tasked with migrating a smallish (@90 mailboxes) company from a linux/dovecot mail server to Office 365, and after experiencing a ton of issues with Microsoft's native Imap syncing tool, I decided to use Imapsync, and it is working perfectly. It has the ability to add a simple regex translation for mapping folders of different names - mainly used for the special use folders that can have different names depending on the server/client involved. Ie, dovecot/Thunderbird use 'Sent', 'Trash' and 'Junk', while Office65/Outlook use 'Sent Items', 'Deleted Items' and 'Junk Emails'. So, a few simple regex lines in the ImapSync commandline options and problem solved: --regextrans2 's/Sent$/Sent Items/' \ --regextrans2 's/Trash$/Deleted Items/' \ --regextrans2 's/Junk$/Junk Email/' \ I do use a few more to catch a few other cases, but you get the idea. I'd be surprised if rsync can't do something similar? Charles On 6/7/2015 12:38 PM, Gionata Boccalini <gionata.boccalini at gmail.com> wrote:> Hello everyone, > > I'm new to this mailing list but I have been using rsync for some > years up to now. > I'm trying to synchronize two directory trees, but I want a special > behavior that I didn't find on the net nor in the manual (or maybe > there is a combination of options to get what I want but I couldn't > find it). > > Tree A is like: > > A > * > * > FolderA > * > * > > And tree B (on a remote filesystem) is like: > > B > * > * > * > FolderB > * > * > > > I have to synchronize everything in one rsync run, like > rysnc -arv A/ B/ > > but I want FolderA to be synchronized with FolderB. > They must contain the same files but have a different name! I want > something like a "directory name translation" in the rsync run... > Is it possible? Do you see any another way of doing this? (A part of > using two rsync runs....) > Please let me know if I didn't explain the problem correctly or you > need further information. > Thank you for your attention and time. > Best regards. > /_______________ > > Gionata Boccalini/ > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20150609/2fe826a4/attachment.html>
Apparently Analagous Threads
- Question on folder sync with "directory name translation"
- Question on folder sync with "directory name translation"
- Question on folder sync with "directory name translation"
- Question on folder sync with "directory name translation"
- Question on folder sync with "directory name translation"