1 / 12

RSYNC

RSYNC. Outline. Introduction Algorithm Features examples. Introduction. A replacement of RCP(remote file copy) that has more feature. It uses the “rsync Algorithm” to bring remote file into sync. It only send the difference across the link. Algorithm. A has new version f’.

tim
Download Presentation

RSYNC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RSYNC

  2. Outline • Introduction • Algorithm • Features • examples

  3. Introduction • A replacement of RCP(remote file copy) that has more feature. • It uses the “rsync Algorithm” to bring remote file into sync. • It only send the difference across the link.

  4. Algorithm A has new version f’ B has old version f 2. B sends the checksums to A 4.A tells B how to construct file f’ from f and the literal data. 1.B computes the checksum of each block Si in file f 3. A searches the file f’ and find the difference between f and f’. The checksum consist of “rolling” 32-bit checksums and a 128-bit MD4 checksum.

  5. Feature • Can update while directory trees and filesystems. • Can use rsh , ssh, or direct socket as the transport. • Support anonymous login which is ideal for mirroring.

  6. Rsync examples • Linux 裝好時就有了, 不需另外安裝. • 執行方式 : rsync --daemon • Port : 873 • Conf 檔: /etc/rsyncd.conf

  7. Conf example [ftp] path = /home/ftp comment = ftp services host allow = 140.113.23.0/24 max connections = 4 [personal] path = /home/eric comment = my personal field. read only = yes auth users = eric secret file = /etc/rsyncd.secrets

  8. Rsync useage • rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST • rsync [OPTION]... [USER@]HOST:SRC DEST • rsync [OPTION]... SRC [SRC]... DEST • rsync [OPTION]... [USER@]HOST::SRC [DEST] • rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST • rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]

  9. Rsync example • List the modules on server rsync 140.113.56.71:: • Backup local file: rsync -azv /home/eric/doc /tmp/backup • Copy files from remote server rsync -azv 140.113.56.71::ftp/hw2 ~/

  10. Rsync example

  11. Use ssh & rsh • With ssh communication rsync -azv -e ssh adm@ftp.nctu.edu.tw:ftp/WWW /home/ftp • Use rsh commands rsync -avR remote:'`find /home -name "*.[cpp]"`' /tmp/

  12. Reference http://rsync.samba.org Man pages of rsync & rsyncd.conf

More Related