• RSYNC
Rsync Tips
Rsync Tips
-
Be careful with trailing slashes with
rsync. Always test behavior first. Excluded directories are relative to the second-to-last folder of the copy-from arg. Here I am copying thesomefolder. But in order to exclude folders directly beneathsome, I must still referencesomein the exclusion. Note the trailing slash at the remote location, which means thesomefolder is copied into/bk/rather than replacing the contents of/bkwith the contents ofsome.rsync -av --delete --delete-excluded --exclude={"some/folder-A","some/folder-B"} /home/user/some remote-sys:/bk/