Exclude symbolic link to a directory?
Bryan K. Wright
bryan at ayesha.phys.Virginia.EDU
Thu Oct 10 14:50:01 EST 2002
Hi folks,
I have a subtle problem with rsync that I'm hoping has a simple
answer. I have a directory tree (call it /local) that I synchronize
every night onto a group of about 100 machines. This works great.
On a few of these machines, one of the subdirectories of /local
(call it /local/stuff) needs to be a symbolic link to a directory
on another device. So, the situation looks like this:
Most machines: A few machines:
/local /local
|-- stuff |-- stuff -> /elsewhere/stuff
|-- things |
|-- morestuff |-- morestuff
`-- stillmorestuff `-- stillmorestuff
(obviously the trees are much larger than this, but you get the idea.)
The master copy of /local contains the directory "stuff", not
a symbolic link. The problem is, when I rsync /local on the few
machines that have a symbolic link, the link gets nuked and replaced
with a real directory (just like in the master copy).
The script that does the rsync looks for a local include/exclude
list, so what I'd like to do is just tell rsync to exclude "stuff".
Unfortunately, I don't want to exclude the "things" that live under stuff.
What I've tried is excluding "/local/stuff" and including
"/local/stuff/*", but the stuff symlink still gets nuked.
Is there any easy way to do what I want with rsync, without
having to re-write my rsync script?
Thanks in advance,
Bryan
--
===============================================================================
Bryan Wright |"If you take cranberries and stew them like
Physics Department | applesauce, they taste much more like prunes
University of Virginia | than rhubarb does." -- Groucho
Charlottesville, VA 22901 |
(434) 924-7218 | bryan at virginia.edu
===============================================================================
More information about the rsync
mailing list