Hello, I've been using rsync to keep two boxes in sync until one replaces the other. To make things a bit more to my liking and to make apache's userdir config a bit simpler, I have added a number of symlinks in the new machine's /home. Both boxes have hashed userdirs, ie: /home/a/auser, /home/b/buser, etc. So I have some symlinks like /home/a/aweirdo -> /home/CORP/aweirdo. These are only on the new box. Is there any way to make use of the --delete flag when doing the transfer and NOT have those symlinks that only exist on the new box be blown away? It doesn't look possible, but perhaps one of the gurus can help come up with a wacky way to work around this. If not, I'll see how much of a pain it is to recreate the symlinks on the old/source box. Thanks, Charles
On 9/13/06, Charles Sprickman <spork@bway.net> wrote:> Is there any way to make use of the --delete flag when doing the transfer > and NOT have those symlinks that only exist on the new box be blown away?If you can write a glob that matches the paths of these symlinks and nothing else, you can pass it to rsync as a protect filter. The receiving rsync (running on the new box) will not delete files located at paths that match the glob. For example: rsync --filter='P /home/[a-z]/*' <more arguments> This is a better approach than not deleting any symlinks at all, because you may delete a symlink in some unrelated area of the old box and want that deletion to propagate to the new box. Matt
On Wed, Sep 13, 2006 at 06:54:19PM -0400, Charles Sprickman wrote:> So I have some symlinks like /home/a/aweirdo -> /home/CORP/aweirdo. These > are only on the new box.If the /home/CORP/aweirdo directory doesn't exist on the source side, try using --keep-dirlinks. ..wayne..