Difference between revisions of "Rsync"
Line 29: | Line 29: | ||
'''Rsyncing between windows and linux'''<br> | '''Rsyncing between windows and linux'''<br> | ||
rsync -av -e ssh george@192.168.122.132:/cygdrive/c/receiver/ /home/george2/Desktop/rec --rsync-path="c:\deltacopy\rsync.exe"<br> | rsync -av -e ssh george@192.168.122.132:/cygdrive/c/receiver/ /home/george2/Desktop/rec --rsync-path="c:\deltacopy\rsync.exe"<br> | ||
+ | |||
+ | Specify the path to the remote rsync program<br> | ||
+ | --rsync-path=/usr/local/bin/rsync |
Latest revision as of 09:01, 4 May 2016
rsync -e 'ssh -p 30000' -avl --delete --stats --progress demo@123.45.67.890:/home/demo /backup/
--exclude-from '/home/backup/exclude.txt'
[root@tecmint]$ rsync -avz rpmpkgs/ root@192.168.0.101:/home/
[root@tecmint]# rsync -avzh root@192.168.0.100:/home/tarunika/rpmpkgs /tmp/myrpms
rsync -avzhe ssh root@192.168.0.100:/root/install.log /tmp/
rsync -avzhe ssh backup.tar root@192.168.0.100:/backups/
4. Exclude path is always relative If you are not careful, you might make this mistake. In the following example, the exclude option seems to have a full path (i.e /dir1/dir2/file3.txt). But, from rsync point of view, exclude path is always relative, and it will be treated as dir1/dir2/file3.txt. In the example below, rsync will look for dir1 under source directory (and not under / root directory). $ rsync -avz --exclude '/dir1/dir2/file3.txt' source/ destination/ So, the above command is exactly same as the following. Just to avoid confusion (and to make it easy to read), don’t give / in front of the exclude path. $ rsync -avz --exclude 'dir1/dir2/file3.txt' source/ destination/
For windows/linux :
http://www.backupsecrets.com/articles/displayarticle/id/Installing-Rsync-on-Windows-or-Linux-Servers-354
rync -e ssh --delete /home/pi/cam/*avi root@own.twig.tk:/var/www/html/cam/
Rsyncing between windows and linux
rsync -av -e ssh george@192.168.122.132:/cygdrive/c/receiver/ /home/george2/Desktop/rec --rsync-path="c:\deltacopy\rsync.exe"
Specify the path to the remote rsync program
--rsync-path=/usr/local/bin/rsync