#1: rsync -a --delete /some/path/a/ /some/otherpath/
#2: rsync -a --delete /some/path/a /some/otherpath/
Answer: the first will make /some/otherpath mirror the contents of /some/path/a, while the latter will create a directory in /some/otherpath/a whose contents will mirror /some/path/a.
Be warned! If you're not careful and you use #1 when you intend to use #2, you can lose files in /some/otherpath.
Edit: Found this resource online: Rsync explanations and recommendations
I found more detailed explanation about trailing slash in this whitepaper:
ReplyDeletehttp://www.sysadmin.md/whitepapers/rsync.pdf