rsync ist eine Art rcp-Ersatz - bloß schlauer. Das Tool kopiert nur Differenzen zwischen zwei Dateien, dabei bedient es sich des rsync- Algorithmus.

rsync einrichten #

rysnc mit apt-get install rsync installieren und in /etc die Datei rsyncd.conf erzeugen. In /usr/share/doc/rsync/ liegt eine Beispielkonfigurationsdatei, die man auch verwenden kann.

 log file=/var/log/rsyncd
 pid file=/var/run/rsyncd.pid
 syslog facility=daemon

ftp#

 comment = Debian FTP Archive (~26 GB)
 path = /var/ftp/pub
 use chroot = yes
 max connections=4  # evtl. entsprechend anpassen
 lock file = /var/lock/rsyncd
 read only = yes
 list = yes
 uid = nobody
 gid = nogroup
 strict modes = yes 
 ignore errors = no
 ignore nonreadable = yes
 transfer logging = no
 log format = %t: host %h (%a) %o %f (%l bytes). Total %b bytes.   # evtl. entsprechend anpassen
 timeout = 600
 refuse options = checksum, dry-run
 dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz

Um rsync Daemon von inetd aufrufen lassen, einfach in /etc/services folgendes eintragen (falls er dort noch nicht steht):

  rsync           873/tcp

Um den Daemon per inetd anzusprechen, muss noch die Datei /etc/inetd.conf einen weiteren Eintrag bekommen.

  rsync      stream      tcp         nowait      root /usr/bin/rsync rsyncd --daemon

Nun dem inetd anschließend ein HUP-Signal schicken, um ihm mitzuteilen, daß die Konfiguration neu eingelesen werden soll.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-2) was last changed on 09-Nov-2006 23:07 by PeterHormanns