To synchronize the content of directory on 2 linux host, you can use command line :
Code:
$ rsync option source destination
For instance, I will synchronize the content of directory /home/nhc/www/ on host 202.46.3.75 with directory /var/www/html/nhc/ on host 202.46.3.98. The syntax will like this :
Code :
$ rsync -av /home/nhc/www/ msmunir@202.46.3.98:/var/www/html/nhc/
This command run on host 202.46.3.75 with account name "nhc". On host 202.46.3.98, I'll use account "msmunir".
Complete code and display on screen :
[msmunir@psjumat4 www]$ rsync -av /home/nhc/www/ msmunir@202.46.3.98:/var/www/html/nhc/
The authenticity of host '202.46.3.98 (202.46.3.98)' can't be established.
RSA key fingerprint is 37:4c:7b:e9:79:a4:81:a8:b0:ca:02:86:1b:d8:b6:1f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '202.46.3.98' (RSA) to the list of known hosts.
msmunir@202.46.3.98's password:
building file list ... done
./
biomaterial.php
....
....
wap/wap.wml
wap/wap2.php
sent 2211772 bytes received 272116 bytes 27752.94 bytes/sec
total size is 41681822 speedup is 16.78
[msmunir@psjumat4 www]$.
by.msmunir@batan.go.id
Code:
$ rsync option source destination
For instance, I will synchronize the content of directory /home/nhc/www/ on host 202.46.3.75 with directory /var/www/html/nhc/ on host 202.46.3.98. The syntax will like this :
Code :
$ rsync -av /home/nhc/www/ msmunir@202.46.3.98:/var/www/html/nhc/
This command run on host 202.46.3.75 with account name "nhc". On host 202.46.3.98, I'll use account "msmunir".
Complete code and display on screen :
[msmunir@psjumat4 www]$ rsync -av /home/nhc/www/ msmunir@202.46.3.98:/var/www/html/nhc/
The authenticity of host '202.46.3.98 (202.46.3.98)' can't be established.
RSA key fingerprint is 37:4c:7b:e9:79:a4:81:a8:b0:ca:02:86:1b:d8:b6:1f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '202.46.3.98' (RSA) to the list of known hosts.
msmunir@202.46.3.98's password:
building file list ... done
./
biomaterial.php
....
....
wap/wap.wml
wap/wap2.php
sent 2211772 bytes received 272116 bytes 27752.94 bytes/sec
total size is 41681822 speedup is 16.78
[msmunir@psjumat4 www]$.
by.msmunir@batan.go.id
No comments:
Post a Comment