rsync example to sync between two computers


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #!/usr/bin/env bash
  2.  
  3. # this code will sync ~/mycode between my personal computers
  4. rsync -urtP -e "ssh" 192.168.1.110:~/mycode/ /remote/pathTo/mycode/
  5. rsync -urtP /remote/pathTo/mycode/ -e "ssh" 192.168.1.110:~/mycode/
  6.  
  7. # I am unsure why the -e "ssh" was I remember that it was
  8. # neccessary to use that.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.