<div dir="ltr">OK , but then the solution with symlinks is equivalent, just with the right options for rsync.<br><div class="gmail_extra"><br></div><div class="gmail_extra">Make the link.<br></div><div class="gmail_extra">Sync + exclude.<br></div><div class="gmail_extra">Remove the link.<br><br></div><div class="gmail_extra">Don't have to live with the folder on the source.<br><br clear="all"></div><div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr"><div><span style="color:rgb(102,102,102)"><i>_______________<br><br>Gionata Boccalini</i></span><br></div></div></div></div>
<br><div class="gmail_quote">2015-06-08 22:49 GMT+02:00 Michael Johnson - MJ <span dir="ltr"><<a href="mailto:mj@revmj.com" target="_blank">mj@revmj.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Oh, actually, I just thought of a couple other another options that don't require any multiplexing or ssh keys, but it would require that your source machine is linux.<div><br></div><div>The first option would be:</div><div><br></div><div>mkdir /A/FolderB</div><div>mount --bind /A/FolderA /A/FolderB</div><div><br></div><div>Then just exclude /A/FolderA from the rsync and you are done.  This does mean that you have to be ok with /A/FolderB existing on the source.</div><div><br></div><div><br></div><div>The second option would be to use somthing like aufs or overlayfs to create a new mountpoint that contains everything you want and perhaps with a little bit of mount --bind thrown in.</div><div><br></div><div><div><br></div></div><div>I just saw your response, and and what you describe makes sense.  Sounds like the mount bind option + exclude might be the most elegant option for this case.  Just make sure to add the bind mount into your fstab so it comes back after a reboot.  :)</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 8, 2015 at 1:18 PM, Michael Johnson - MJ <span dir="ltr"><<a href="mailto:mj@revmj.com" target="_blank">mj@revmj.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thought I would chime in here.  To the best of my knowledge what you are trying to do cannot be done in a single run.  I supposed --fuzzy might work for you but I've never used that option and it sounds scary to me.  Perhaps if I spent some time and learned the methodology it uses I would be less concerned.  If a feature like this were to be added, it seems like it would make sense to add it as a new "filter" type.<div><br></div><div>But mainly you've piqued my curiosity.  The requirement that it be able to happen in a single rsync run seems very odd.  Is this just a desire, or is there really something that bad that would happen if you did one pass syncing A to B excluding FolderA and FolderB and then a second pass syncing FolderA to FolderB?</div><div><br></div><div>The most likely scenario I imagine is that you are running this by hand and manually enter the SSH password.  Given the process take a long time, you don't want to enter the password again mid stream.  If this is the case, you could set up SSH keys to allow this to happen without a manually typed password.  You can find how to set that up here:</div><div><a href="http://www.chainsawonatireswing.com/2012/01/15/ssh-into-your-synology-diskstation-with-ssh-keys/" target="_blank">http://www.chainsawonatireswing.com/2012/01/15/ssh-into-your-synology-diskstation-with-ssh-keys/</a><br></div><div><br></div><div>If you don't want to do ssh keys w/o a password, you could use ssh agent with keys.</div><div><br></div><div>Finally you could also utilize ssh multiplexing (it looks like that should work with the synology nass).  You can find information about this option here:</div><div><a href="http://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing" target="_blank">http://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing</a><br></div><div><br></div><div>The other (very unlikely) scenario I can imagine is that there is something that prevents you from logging in more than once every X hours/days like a time lock safe.  multiplexing would help here as well.  But this scenario seems unlikely, it was probably silly to even mention it.</div><div><br></div><div>If there is another case I have not considered I would be very interested to know where this requirement comes from.<br></div><div><br></div><div>Thanks!  Hope there was something useful for you in all this.  :)</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Sun, Jun 7, 2015 at 9:38 AM, Gionata Boccalini <span dir="ltr"><<a href="mailto:gionata.boccalini@gmail.com" target="_blank">gionata.boccalini@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div>Hello everyone,<br><br></div>I'm new to this mailing list but I have been using rsync for some years up to now.<br></div>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).<br><br></div>Tree A is like:<br><br></div>A<br>  *<br>  *<br><div><div>   FolderA<br>  *<br>  *<br><br>And tree B (on a remote filesystem) is like:<br><br></div><div>B<br></div><div>  *<br>  *<br>  *<br><div>   FolderB<br>  *<br>  *<br><br clear="all"></div><span style="color:rgb(102,102,102)"></span><br></div><div>I have to synchronize everything in one rsync run, like <br></div><div>rysnc  -arv  A/  B/<br><br></div><div>but I want FolderA to be synchronized with FolderB. <br>They must contain the same files but have a different name! I want something like a "directory name translation" in the rsync run...<br></div><div>Is it possible? Do you see any another way of doing this? (A part of using two rsync runs....)<br></div><div>Please let me know if I didn't explain the problem correctly or you need further information.<br></div><div>Thank you for your attention and time.<br></div><div>Best regards.</div><div><div><div><div><div><div><div dir="ltr"><div><span style="color:rgb(102,102,102)"><i>_______________<span><font color="#888888"><br><br>Gionata Boccalini</font></span></i></span><br></div></div></div></div>
</div></div></div></div></div></div>
<br></div></div><span>--<br>
Please use reply-all for most replies to avoid omitting the mailing list.<br>
To unsubscribe or change options: <a href="https://lists.samba.org/mailman/listinfo/rsync" target="_blank">https://lists.samba.org/mailman/listinfo/rsync</a><br>
Before posting, read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a><br></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Michael Johnson - MJ</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Michael Johnson - MJ</div>
</div>
</div></div></blockquote></div><br></div></div>