Hi! I am using rsync succesfully to maintain my mirrors. I have one problem, tho. To improve speeds of my filesystems, I have created a raid 0 of 4 disks, and I place the most heavily copied disks there. The fs has subdirectories, one for each set of typically .iso files, such as Mandrakelinux or fedora. I would like to be able to just do a symlink from the original tree to the directory on the raid, but rsync deletes this symlink and the copies the .iso files again. I have asked other rsync users, and they have the same problem. What I do now, is to mount the raid directory on the mirror tree, but that is ugly, as I cannot unmount it again, unless the raid fs is idle, which seldom happens:-( Any good suggestions? Have I overlooked a subtle option in rsync that does this for me? best regards keld
On Thu, Jun 03, 2004 at 07:23:33PM +0200, Keld J?rn Simonsen wrote:> I would like to be able to just do a > symlink from the original tree to the directory on the raid,Then you must either (1) tell rsync to expand all symlinks, (2) avoid having rsync copy the non-matching symlink, (3) duplicate the symlinked setup on the source so it matches the destination. The first alternative is easy: just use the -L option to rsync. Note that EVERY symlink will be replaced by the file/dir it points to, so if you want to preserve symlinks, this option is not going to work. The second alternative means that you must exclude the non-matching symlink from the global copy and do an additional copy of the files inside the symlinked dir. For instance: rsync -av --exclude=/tree/sym /path/tree remote:/mirror rsync -av /path/tree/sym/ remote:/mirror/tree/sym That prevents /tree/sym from ever being copied by rsync, but does copy its contents (note the trailing slash). The third option is pretty obvious but is rarely applicable, so I won't say anything more about it here. ..wayne..
On Thu, Jun 03, 2004 at 10:41:06AM -0700, Wayne Davison wrote:> On Thu, Jun 03, 2004 at 07:23:33PM +0200, Keld J?rn Simonsen wrote: > > I would like to be able to just do a > > symlink from the original tree to the directory on the raid, > > Then you must either (1) tell rsync to expand all symlinks, (2) avoid > having rsync copy the non-matching symlink, (3) duplicate the symlinked > setup on the source so it matches the destination. > > The first alternative is easy: just use the -L option to rsync. Note > that EVERY symlink will be replaced by the file/dir it points to, so if > you want to preserve symlinks, this option is not going to work.Hmm, I want to keep the symlinks in the original tree. So I think there is no way to have both: keeping the original symlinks and having my own symlinks are mutually exclusive options. So I would need to go for your option 2... I had hoped there was an option to do it, or I could have a new option implemented, but I think that is not logically possible. Best regards keld