Difference between revisions of "Rsync"

From Useful Things
Jump to: navigation, search
(Created page with "== Common arguments == <code>-a</code> same as <code>--archive</code><br /> <code>-v</code> same as <code>--verbose</code><br /> <code>-x</code> same as <code>--one-file-syste...")
 
 
Line 14: Line 14:
 
rsync -avx user@host:/path/to/source /path/to/destination
 
rsync -avx user@host:/path/to/source /path/to/destination
 
</source>
 
</source>
 +
 +
== Pull via SSH ==
 +
<source lang="bash">
 +
rsync -avx --progress -e 'ssh -p 1080' --exclude-from=EXCLUDE_FILESOURCE_IP:/ /
 +
</source>
 +
<code>-p</code> to specify alternate SSH port

Latest revision as of 16:48, 14 September 2014

Common arguments

-a same as --archive
-v same as --verbose
-x same as --one-file-system
-z compress files over the network

Push

rsync -avx /path/to/source user@host:/path/to/destination

Pull

rsync -avx user@host:/path/to/source /path/to/destination

Pull via SSH

rsync -avx --progress -e 'ssh -p 1080' --exclude-from=EXCLUDE_FILESOURCE_IP:/ /

-p to specify alternate SSH port