General rsync command

ARUN Post in RSYNC
0

[   rsync -e ssh -az --progress /home/arun/Desktop/ 192.168.1.99:/home/arun/Desktop/     ]

[  rsync -avz -e “ssh -p $portNumber” /local/path/  user@remoteip:/path/to/files/    ]

Make sure to put the last  ” / ” and if it is not there then the destination server will have  /home/arun/Desktop/Desktop  folder instead.

Local rsync

rsync -avvz /home/aaron/Desktop/source/ /home/aaron/Desktop/destination/

EXCLUDE ***

rsync -avvz /home/aaron/Desktop/source/ /home/aaron/Desktop/destination/ –exclude=movies/sandhuz

All files under  “source” will be transferred to “destination” and it will keep all files under folder “destination” the intact.

 rsync -avvz –log-file=/tmp/log.txt –exclude=/proc -e ssh / u[email protected]:/home/username/

Another example

[  rsync -avvz --log-file=/home/arun/rsync_log.txt /home/arun/ [email protected]:/home/arun/ --exclude=public_html/cache  ]

 

Note : 

[    --progress   or  -w switch will  show the speed of transfer   ]

« Prev: :Next »

Leave a Reply

You must be logged in to post a comment.