Rsync

Rsync

infobox software
name = rsync

caption = rsync logo
author = Andrew Tridgell, Paul Mackerras
developer = Wayne Davison
latest_release_version = 3.0.4
latest_release_date = September 6 2008
genre = Data transfer/ differential backup
license = GNU General Public License
website = http://rsync.samba.org/

rsync is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar programs/protocols is that the mirroring takes place with only one transmission in each direction. rsync can copy or display directory contents and copy files, optionally using compression and recursion.

In daemon mode, rsync listens to the default TCP port of 873, serving files in the native rsync protocol or via a remote shell such as RSH or SSH. In the latter case, the rsync client executable must be installed on both the local and the remote host.

Released under the GNU General Public License, rsync is free software.

Algorithm

The rsync utility uses an algorithm (invented by Australian computer programmer Andrew Tridgell) for efficiently transmitting a structure (such as a file) across a communications link when the receiving computer already has a different version of the same structure.

The recipient splits its copy of the file into fixed-size non-overlapping chunks, of size S, and computes two checksums for each chunk: the MD4 hash, and a weaker 'rolling checksum'. It sends these checksums to the sender. Version 30 of the protocol (released with rsync version 3.0.0) now uses MD5 hashes rather than MD4. [http://rsync.samba.org/ftp/rsync/src/rsync-3.0.0-NEWS]

The sender computes the rolling checksum for "every" chunk of size S in its own version of the file, even overlapping chunks. This can be calculated efficiently because of a special property of the rolling checksum: if the rolling checksum of bytes n through n+S-1 is R, the rolling checksum of bytes n+1 through n+S can be computed from R, byte n, and byte n+S without having to examine the intervening bytes. Thus, if one had already calculated the rolling checksum of bytes 1–25, one could calculate the rolling checksum of bytes 2–26 solely from the previous checksum, and from bytes 1 and 26.

The rolling checksum used in rsync is based on Mark Adler's adler-32 checksum, which is used in zlib, and which itself is based on Fletcher's checksum.

The sender then compares its rolling checksums with the set sent by the recipient to determine if any matches exist. If they do, it verifies the match by computing the MD4 checksum for the matching block and by comparing it with the MD4 checksum sent by the recipient.

The sender then sends the recipient those parts of its file that did not match any of the recipient's blocks, along with assembly instructions on how to merge these blocks into the recipient's version. In practice, this creates a file identical to the sender's copy. However, it is in principle possible that the recipient's copy differs at this point from the sender's: this can happen when the two files have different chunks that nonetheless possess the same MD4 hash and rolling checksum; the chances for this to happen are in practice extremely remote.

If the sender's and recipient's versions of the file have many sections in common, the utility needs to transfer relatively little data to synchronize the files.

While the rsync algorithm forms the heart of the rsync application that essentially optimizes transfers between two computers over TCP/IP, the rsync application supports other key features that aid significantly in data transfers or backup. They include compression and decompression of data block by block using zlib at sending and receiving ends, respectively, and support for protocols such as ssh that enables encrypted transmission of compressed and efficient differential data using rsync algorithm. Instead of ssh, stunnel can also be used to create an encrypted tunnel to secure the data transmitted.

Uses

rsync is written as a replacement for rcp and scp [As indicated in the [http://rsync.samba.org/ftp/rsync/README README file] ] . One of the earliest applications of rsync was to implement mirroring or backup for multiple Unix clients onto a central Unix server using rsync/ssh and standard Unix accounts. With a scheduling utility such as cron, one can even schedule automated encrypted rsync-based mirroring between multiple host computers and a central server.

Variations

A utility called rdiff uses the rsync algorithm to generate delta files with the difference from file A to file B (like the utility diff, but in a different delta format). The delta file can then be applied to file A, turning it into file B (similar to the patch utility).

Unlike diff, the process of creating a delta file has two steps: first a signature file is created from file A, and then this (relatively small) signature and file B is used to create the delta file. Also unlike diff, rdiff works well with binary files.

Using rdiff, a utility called rdiff-backup has been created, capable of maintaining a backup mirror of a file or directory over the network, on another server. rdiff-backup stores incremental rdiff deltas with the backup, with which it is possible to recreate any backup point.

duplicity is a variation on rdiff-backup that allows for backups without cooperation from the storage server, as with simple storage services like Amazon S3. It works by generating the hashes for each block in advance, encrypting them, and storing them on the server, then retrieving them when doing an incremental backup. The rest of the data is also stored encrypted for security purposes.

History

rsync was first announced on 19 June 1996. [ cite newsgroup | newsgroup = comp.os.linux.announce | date = 19 June 1996 | first = Andrew | last = Tridgell | url = http://groups.google.com/group/comp.os.linux.announce/msg/3bb93f6484065f20 | title = First release of rsync - rcp replacement | id = #1/1 | accessdate = 2007-07-19 ] The original authors were Andrew Tridgell and Paul Mackerras.

Rsync 3.0 was released on 1 March 2008. [cite mailing list | url = http://lists.samba.org/archive/rsync-announce/2008/000057.html | date = 1 March 2008 | first = Wayne | last = Davison | title = Rsync 3.0.0 released | mailinglist = rsync-announce ]

See also

* CVSup
* Unison (file synchronizer)
* PowerFolder
* Jigdo
* Grsync
* cwRsync

References

External links

* [http://rsync.samba.org rsync homepage]
* [http://rsync.samba.org/tech_report/node2.html rsync algorithm]
* [http://everythinglinux.org/rsync/ rsync tutorial]
* [http://www.perihel.at/3/index.html#rsync A short practical example]
* [http://www.fredshack.com/docs/rsync.html Easy to follow rsync tutorial]
* [http://greenmice.info/en/node/34 Using rsync on windows]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • rsync — Original author(s) Andrew Tridgell, Paul Mackerras Developer(s) Wayne Davison Initia …   Wikipedia

  • Rsync — Saltar a navegación, búsqueda rsync es una aplicación de software para sistemas de tipo Unix que ofrece transmisión eficiente de datos incrementales comprimidos y cifrados. Mediante una técnica de delta encoding, permite sincronizar archivos y… …   Wikipedia Español

  • rsync — Maintainer Wayne Davison Aktuelle Version 3.0.9 (23. September 2011) Betriebssystem Unix, Linux, Mac OS X, Microsoft Windows, OS/2 Kategorie …   Deutsch Wikipedia

  • Rsync — Maintainer: Wayne Davison Aktuelle Version: 3.0.5 (28. Dezember 2008) Betriebssystem: Unix, u. a. Linux, Mac OS X, Windows, OS/2 …   Deutsch Wikipedia

  • rsync — Développeurs Andrew Tridgell, Paul Mackerras Dernière version …   Wikipédia en Français

  • Rsync — Разработчик Wayne Davison ОС Кроссплатформенное программное обеспечение Версия 3.0.7 (31 декабря 2009) Лицензия GPL Сайт …   Википедия

  • rsync — Разработчик Wayne Davison Операционная система Кроссплатформенное программное обеспечение Последняя версия 3.0.9 (23 сентября 2011) Лицензия GPL Сайт …   Википедия

  • Rsync — Développeurs Andrew Tridgell, Paul Mackerras Dernière version …   Wikipédia en Français

  • RsyncX — rsync Maintainer: Wayne Davison Aktuelle Version: 3.0.5 (28. Dezember 2008) Betriebssystem: Unix, u. a. Linux, Mac OS X, Windows, OS/2 …   Deutsch Wikipedia

  • Rsyncx — rsync Maintainer: Wayne Davison Aktuelle Version: 3.0.5 (28. Dezember 2008) Betriebssystem: Unix, u. a. Linux, Mac OS X, Windows, OS/2 …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”