rsyncd Linux zu Windows

mercredi 30 septembre 2015

Guten Tag :)

Wer kennt sich hier mit rsync bzw. mit rsyncd (dem Deamon) aus? :D

Ich habe folgendes Problem: Ich möchte mit Hilfe von rsyncd die Dateien in einem Verzeichnis unter Linux (Server) auf mein Windows XP (Client) [mit Cygwin] automatisch synchronisieren. Das heißt, sobald sich eine Datei in diesem Verzeichnis unter Linux ändert, soll die Kopie dieser Datei sich auch automatisch unter Windows ändern. Dies ist mit hilfe von rsync auch möglich! Der manuelle Weg (einmalig) nur mit rsync hat bei mir auch geklappt, allerdings will ich das ganze automatisiert haben. -> rsyncd.

Ich probiere schon SEHR lange daran rum und habe schon zahlreiche Tutorials ausprobiert. Nur irgendwo hackt es am Ende.

Meine Vorgehensweise:

Beispiel: Linux-Server: 192.168.67.31 / Windows-Client: 192.168.67.69

Part I

Cygwin installieren: http://ift.tt/Vv2Ltq (Dieses Programm eröffnet eine Linux-Shell auf dem Windows-Rechner)

Bei der Installation fragt er nach Packages -> "Net" aussuchen und: rsync, bash, openssh aussuchen



Part II (Linux)

nano /etc/rsyncd.conf

Edit zu:

lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid

transfer logging = true

log format = %h %o %f %l %b

[pub]

comment = Public Share

path = /home/Quellverzeichnis

read only = no

list = yes

uid = nobody

gid = nogroup

secrets file = /etc/rsyncd.secrets

hosts allow = 192.168.67.69



nano /etc/rsyncd.secrets
Edit zu:
# user: passwort
root:root
user:user
nano /etc/xinetd.d/rsync
Edit zu:
service rsync
{
disable = no
socket_type = stream
port = 873
protocol = tcp
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
service xinetd restart

nano /etc/default/rsync

Ändern zu: RSYNC_ENABLE=true

rsync --config=/etc/rsyncd.conf --daemon --no-detach & (Braucht man das??)


auf dem Windows-Client (Cygwin) HOLT sich die Daten vom Remote-Server (linux). mit dem Befehlt:

rsync -zv rsync://root@192.168.67.31/pub/home/quelle /cygdrive/c/ziel


Dabei kommt bei mir der folgende Fehler raus:

rsync: change_dir "/home" (in pub) failed: No such file or directory (2)

Hier -> var/log/rsyncd.log steht Folgendes:

2007/01/01 02:33:24 [2852] connect from Windows-PC (192.168.67.69)

2007/01/01 01:33:24 [2852] rsync on pub/home/quelle from Windows-PC (192.168.67.69)

2007/01/01 01:33:25 [2852] building file list

2007/01/01 01:33:25 [2852] rsync: change_dir "/home" (in pub) failed: No such file or directory (2)



Vielen Dank im Voraus!


0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor