User Tools

Site Tools


tutorials:rsync

This is an old revision of the document!


rsync

rsync is a powerful tools for syncing files, either locally on the same machine or remotely between different machines. Use man rsync to read the manual pages to learn more.

For example, if I want to sync (i.e., update all files that have been newly created or modified and remove all files that have been deleted) the ~/active_project directory on my local workstation up to the server (oak.local in this example), the process can be completed in one command: <code bash> rsync -av –delete ~/active_project oak.local:~ </bash>

Alternatively, if I want to copy only the files that have been changed in /scratch/chkuo/spiro1.02 directory on the server (oak.local again) back to my local workstation, I can use: <code bash> rsync -av –delete oak.local:/scratch/chkuo/spiro1.02 /scratch/chkuo </bash>

This better than scp -pr because rsync can skip files that already exist in the destination and have not been updated in the source.

tutorials/rsync.1339693582.txt.gz · Last modified: 2012/06/15 01:06 by chkuo