Difference between revisions of "rsync"
From thelinuxwiki
(Created page with " using ssh # rsync -avz '''-e ssh''' remoteuser@remotehost:/remote/dir /this/dir/ category:backup") |
|||
(One intermediate revision by one user not shown) | |||
Line 3: | Line 3: | ||
# rsync -avz '''-e ssh''' remoteuser@remotehost:/remote/dir /this/dir/ | # rsync -avz '''-e ssh''' remoteuser@remotehost:/remote/dir /this/dir/ | ||
+ | effect of trailing slash... | ||
+ | #1: rsync -a --delete /some/path/a/ /some/otherpath/ | ||
+ | |||
+ | #2: rsync -a --delete /some/path/a /some/otherpath/ | ||
+ | |||
+ | 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. | ||
[[category:backup]] | [[category:backup]] |
Latest revision as of 15:39, 28 March 2014
using ssh
# rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/
effect of trailing slash...
#1: rsync -a --delete /some/path/a/ /some/otherpath/
#2: rsync -a --delete /some/path/a /some/otherpath/
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.