Matt McCutchen schreef:
On Mon, 2008-07-07 at 12:49 +0200, Hendrik Maryns wrote:I just read the thread http://lists.samba.org/archive/rsync/2004-June/009678.html which describes how --keep-dirlinks came to be. My use case is similar, but I’d like a similar option for files as well.Setup: in my public_html I have some symlinks which I send over as files, with -L (for various reasons: partly, because they are copies of current work which is done elsewhere, or because several websites use the same files, such as SSI footers). However, I also want to check whether my colleague changed the files on the server, so first I do an update. However, this replaces the links with the files themselves.My current usage is: # First look whether stuff changed on the other side (shouldn’t) # rsync -rtKPuzb webserver:public_html/ /home/hendrik/public_html/Hendrik/ # Then put changes from here.rsync -rtkKLPzC --delete --delete-excluded --exclude-from=/home/hendrik/.website-exclude /home/hendrik/public_html/Hendrik/ webserver:public_htmlAs you can see, I have the first line commented out, because it replaces symlinks. I’d like something similar to --keep-dirlinks which follows links on the receiver and compares the files linked to with those sent.Is this possible, or is it an RFE?If files aren't supposed to change directly on the server, it seems to me that you could just drop the first command, add -uvv to the second command, watch for any "FILE is newer" messages, and handle those files manually. If files do change, consider using the two-way synchronizer Unison ( http://www.cis.upenn.edu/~bcpierce/unison/ ); it can update files through symlinks, but I don't think it has an equivalent to --delete-excluded.
Files can change. Rarely, but my collaborators may want to make changes. I think I’ll go for the -uvv option for now, but it would really be nicer if the files that are linked to on the receiver were updated.
Hm, I think I’ll grep the output of rsync for ‘newer’.
A --keep-links option may still be worth having in rsync. Updating a file atomically through a symlink is nontrivial (one has to readlink the chain of symlinks and combine the paths to find the ultimate location to rename to), but Unison implements this, so I don't see why rsync couldn't.
Should I put an RFE somewhere officially? H. -- Hendrik Maryns SFB 441 Linguistische Datenstrukturen Seminar für Sprachwissenschaft Universität Tübingen Nauklerstraße 35 72074 Tübingen +497071 29-72732 http://tcl.sfs.uni-tuebingen.de/~hendrik/
signature.asc
Description: OpenPGP digital signature
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
