Advertisement
badlogic

copy rsync from server to local vice versa

Apr 25th, 2017
807
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.54 KB | None | 0 0
  1.  
  2.  
  3. ref:  http://stackoverflow.com/questions/9090817/copying-files-using-rsync-from-remote-server-to-local-machine
  4.  
  5.  
  6. From your local machine:
  7.  
  8. rsync -chavzP --stats user@remote.host:/path/to/copy /path/to/local/storage
  9. From your local machine with a non standard ssh port:
  10.  
  11. rsync -avz -e "ssh -p $portNumber" user@remote.host:/path/to/copy /local/path
  12. Or from the remote host, assuming you really want to work this way and your local machine is listening on SSH:
  13.  
  14. rsync -chavzP --stats /path/to/copy user@host.remoted.from:/path/to/local/storage
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement