hi i have a question. is there an easy way to remember transfered files to a specific destination host. little example: 1) host A: with files a, b, c 2) rsync-transfer them to host B 3) add a new file d to host A 4) delete file c from host B 5) again a rsync transfer, but file c get skipped, d get transferred maybe as a feature request: add an check for an extended attribut of the files which gets set if a file is the first time transfered and get skipped if the attribut is set. or is it possible to move all transfered files directly in an rsync exclude file; would have the same effect i hope somebody understand what i want ;-) mfg hermann -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: not available Url : http://lists.samba.org/archive/rsync/attachments/20060322/35e450a8/attachment.bin
On Wed, 2006-03-22 at 00:12 +0100, Hermann Gausterer wrote:> i have a question. is there an easy way to remember transfered > files to a specific destination host. > > or is it possible to move all transfered files directly in an > rsync exclude file; would have the same effectThat would be pretty easy. Set rsync's verbosity/itemizing at an appropriate level and then write a little script that parses its output into a list of names of transferred files using grep and sed. Append to an exclude file. What you're doing vaguely resembles half of two-way synchronization: copy in one direction but keep local changes. If new cases such as not overwriting files modified on host B arise, consider using Unison or even a version control system. -- Matt McCutchen hashproduct@verizon.net http://hashproduct.metaesthetics.net/
Hermann Gausterer wrote:> > hi > > i have a question. is there an easy way to remember transfered > files to a specific destination host. > > little example: > 1) host A: with files a, b, c > 2) rsync-transfer them to host B > 3) add a new file d to host A > 4) delete file c from host B > 5) again a rsync transfer, but file c get skipped, d get transferred > > maybe as a feature request: > add an check for an extended attribut of the files which gets > set if a file is the first time transfered and get skipped if > the attribut is set. > > or is it possible to move all transfered files directly in an > rsync exclude file; would have the same effect > > i hope somebody understand what i want ;-) > > mfg hermann >Further, I can see two possibilities that should be distinguished: when file c is updated on host A: plan A: transfer the updated file c to host B plan B: do not transfer the file c (updated or no) to host B With anything but rsync I'd guess your chances are between slim and none. Leaving a zero-length unwritable file with the same name would achieve some of the objectives (but is ugly even compared to what I usually do)