Whatis rsync ? :)
- Efficiently copies files to or from remote systems.Also it is faster than scp.
rsync (1) – faster, flexible replacement for rcp
rsync (rpm) – A program for synchronizing files over a network.
- Before you must be sure, was it installed rsync on your system?
[root@localhost ~]yum list installed | grep 'rsync'
If it didn’t exist on your system, you should just running that command.
yum install rsync -y
General Commands of Rsync:
rsync -vv -e ssh /home/ugurengin/proftpd.tar.gz root@192.168.219.129:~
opening connection using ssh -l root 192.168.219.129 rsync --server -vv . "~"
root@192.168.219.129's password:
delta-transmission enabled
proftpd.tar.gz
total: matches=1398 hash_hits=1398 false_alarms=0 data=0
sent 5683 bytes received 8430 bytes 4032.29 bytes/sec
total size is 1945600 speedup is 137.86
“~” mean same as a users’ directory.For instant: /home/ugurengin/
rsync -vv -z -e ssh /root/proftpd-1.3.2-2.1.el5.kb.i386.rpm root@192.168.219.129:/var/lib
opening connection using ssh -l root 192.168.219.129 rsync --server -vvz . /var/lib
root@192.168.219.129's password:
delta-transmission enabled
proftpd-1.3.2-2.1.el5.kb.i386.rpm
total: matches=0 hash_hits=0 false_alarms=0 data=1934854
sent 1935618 bytes received 42 bytes 203753.68 bytes/sec
total size is 1934854 speedup is 1.00
rsync -vv -z -e ssh /var/www/domains/* root@192.168.219.129:/var/www/vhosts/
rsync -vv -z -e ssh /home/matrix/*.c root@192.168.219.129:/home/ugurengin/Desktop/sploits
rsync -r -a -v -e "ssh -l ugurengin" --delete 192.168.219.129:/root/ /root
ugurengin@192.168.219.129's password:
receiving file list ... done
deleting SSL/test.sh
deleting SSL/ca.key
deleting SSL/ca.csr
deleting SSL/ca.crt
deleting SSL/
deleting .ssh/known_hosts
deleting .ssh/
deleting .mozilla/firefox/kj4ahwnh.default/extensions/
deleting .mozilla/firefox/kj4ahwnh.default/chrome/userContent-example.css
deleting .mozilla/firefox/kj4ahwnh.default/chrome/userChrome-example.css
deleting .mozilla/firefox/kj4ahwnh.default/chrome/
sent 2150 bytes received 2236509 bytes 298487.87 bytes/sec
total size is 2233337 speedup is 1.00
rsync -r -vv -e "ssh -l ugurengin" --max-size=2048k 192.168.219.129:/root/backup /root
opening connection using ssh -l ugurengin 192.168.219.129 rsync --server --sender -vvr . /root/
ugurengin@192.168.219.129's password:
“-vv” Gives more information about actions.
“-e, –rsh=COMMAND” specify the remote shell to use
–max-size=SIZE don’t transfer any file larger than SIZE
–min-size=SIZE don’t transfer any file smaller than SIZE
I just have been tested these commands whic linux storage transferring and rsnyc’s structure.
Share on Facebook