[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Rsync und die Uhrzeit.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ja hallo erstmal,...

Am Mittwoch, 22. September 2004 17:22 schrieb Norbert Preining:
> On Mit, 22 Sep 2004, Jan Lühr wrote:
> > Rsync synchronisiert Dateien bekanntlich in einer client-Server
> > architektur. Welches FS / Programm synchronisiert Dateien in einer P2P
> > Architektur?
>
> Schau dir mal drsync an, vielleicht hilft das (apt-get install drsync).

Meine Anfangseuphorie ist ein wenig verflogen - es kann sein, dass ich das 
Programm nicht ganz verstehe.

Ich beziehe mich einfach mal auf ein Beispiel in der Doku:

drsync --verbose --rsh=ssh --exclude=BACKUP --recursive \
    --state-file=.mail.desktop.drsync.bz2 desktop:mail ~
  drsync --verbose --rsh=ssh --recursive \
    --state-file=.mail.notebook.drsync.bz2 mail desktop:

Ich denke, dass lässt sich ohne große Sinnververschiebung zusammenschrumpfen 
als

dsync --state-file=status.dat desktop:mail ~
und
dsync --state-file=status.dat mail desktop:

Ok... soweit so gut, dass könnte sinn machen. Mit der Erklärung:

"In the first step drsync copies the new mails from the desktop to the 
notebook, and in the second, it copies the changes from the notebook back to 
the desktop. "
Werden diese beiden Kommandos direkt hintereinanderaufgerufen? (Imho wohl 
kaum, denn es müssen sich Änderungen ergeben.) Was aber, wenn es durch einen 
Fehler nicht möglich war, und der 2. Befehl nicht ausgeführt werden konnte, 
bevor der erste ein 2. Mal aufgerufen wurde? Werden hier nicht die Änderungen 
gelöscht? (Der Einfachheit halber, will ich hoffen, dass bei Änderungen an 
ein und der selben Datei die letzte Version als akuelle gilt, was ist aber 
bei Änderungen (löschen, etc.) der Verzeichnisstruktur.
Was wäre also, wenn ich Mails bearbeite, aber neue eintreffen? Werden nach dem 
2. Befehl nicht alle in der Zeit ankommenden Mails gelöscht?

Die Doku verstehe ich so...

"HOW IT WORKS
 
rsync made the majority of the work, so rsync is required in both sides of the 
synchronization. drsync is required only in the caller side. 

 First, it loads the file-list from the file, which is specified by the 
"--state-file" command-line argument. 

 Then it generates the current filelist (by calling rsync -n), and compares 
the two state. 

 Then it deletes the deleted files and creates the newly created files in the 
destination place, using rsync-rsh if necessary. The new files are created 
with 1970-01-01 timestamp (unix epoch), and they are 0 bytes long. 

 Then the new filelist is written back to the disk. Note: the filelist must be 
in the machine, where drsync runs. 

 Last, but not least we call rsync (again) to do the synchronization works, 
with "--existing" and "--update". Then it copies the files which are 
necessary to be copied. 

 The "state-file" can be compressed with gzip or bzip2, it is detected by the 
extension of the file. "

Ich finde das irgendwie total konfus. Woher kommt die --state-file Datei?
Im nächsten Schritt sollen "neue" Dateien angelegt und gelöschte gelöscht 
werden.
Ist eine zu löschende Datei eine in der Statelist nicht-vorkommende aber 
trotzdem vorhandene Datei?
Und falls ja, wie wird das state-file geändert? Wenn ich einfach mal annehme, 
dass das Beispiel abegesehen von den know-issues funktioniert, wäre es das 
Programm was ich brauche.
Die Doku ist jedoch nicht mein Ding.
Hat hier jemand Erfahrung mit diesem Programm?

Keep smiling
yanosz


Gehe ich aber weiter, wird es nicht ganz so klar.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQIVAwUBQVGjRdAHMQ8GQaYRAQIUdxAAgXzMUFTJAvZ2HRBn84cKqH18bwByIwPn
WWshmNwObXKbHtSmzZWq/T27JAYij9PVM/k+QDDKY+SrQg4+T2rSheyggkivhu75
C+3zQe+9Njmq1WHXTlt+hLqi5yBuydo1lkP7JulBiB6M7WwTFS2xKYBlCxUPxr+8
xdaWI/9aEUvbCT5fKpreI4X2SqYORtL/io7/vin/ngnDety1SvP9w9N7Clb4BACg
gnilM4tc3bu1fFoVjTVIeak2KA3LYur7m1/+Qq2rCC/15BtvYBe0TH7QDCNReq2q
pWrJR0hjwVEND45THLc8Onc6HqGYrIh9ByDts+f+UzT1SnLDgmhJxNbIIXjQX+ZL
i4cFLXO6kcwCeJBzgbxOdm/4k69tkT+C+Dt8w6SneQ5OH6ikqV63FwadoVWPK/WI
X1wX/5iLCMrAPqyOElnG3b6zB37L1IL6yBBuhrz84mwmrOy3XmCQIn1yaeDO3SzD
KTIr8FTilVqTTuAlPnMZIpRfg8vLIKwadyGAvIvzEfPPpG+9ALuQrnGecwcpG6rP
qxqLTuqFQbWrLg1pZDwZ2szEET17apm6K/eb6buO2BgmchvctqaZMcY4AnjKAnoh
PydNN7/7uCARNRmY7eumPmE36P7Bu4oTsNwJIM6K2m3loOJ9aoaOixk0OHKJU9s9
6vwPqMyq4lQ=
=E/jK
-----END PGP SIGNATURE-----



Reply to: