I’m using RSync for two operations, backup my files into local harddisk and backup my files into another computer storage in LAN. For the second reason, we don’t need to type a password to make a connection with destination computer 🙂
Copy files into secondary storage in one computer
Just open a Konsole, then type rsync -avzp –delete /source-folder/ /destination-folder/
Copy files into secondary storage in another LAN computer
- Open a Konsole, type ssh-keygen -t rsa then push Enter/Return 3 times
- Type ssh-copy-id -i ~/.ssh/id_rsa.pub username@remote_host (I’m using root as username, ex: root@192.168.2.2)
- Enter your password for username on remote host (I’m using the same root password on the remote host computer/destination computer)
- Type rsync -e ‘ssh -p 22’ -avzp –delete /source-folder/ remote_host:/destination-folder/ (ex: rsync -e ‘ssh -p 22’ -avzp –delete /source-folder/ 192.168.2.2:/destination-folder/)
Explanation of these script will be explain soon 🙂
Leave a comment