[Tfug] rsync question

John Gruenenfelder johng at as.arizona.edu
Wed Apr 2 19:02:15 CDT 2008


Hello all,

I use rsync as part of my scripted bi-hourly snapshot process on a multi-user
machine.  Since it is multi-user, many of the files are owned by others and I
don't need to or want to care about things like broken links.  However, after
one user cleaned up a bunch of his files, my script is now giving errors like:

rsync: link_stat "/d1/matlab/nmilton/fourier" (in root) failed: No such file
or directory (2)

It doesn't stop the process from completing, of course, but it does generate
superfluous output which means that cron mails it to me (a clean run with no
output means no emails to bug me).

My script also uses the --delete option and these link_stat errors *do*
interrupt that, causing rsync to skip that step.

If I read that error properly, it means that somewhere on the filesystem that
is being copied, there is a symlink that points to that path and that it is a
broken link.  However, I am using the -a (archive) switch which turns on -l
(copy symlinks as symlinks).  So why does rsync even bother to complain?  It
doesn't need the data at all because it's just copying the symlink.

Now, I can use the --ignore-errors option to have rsync follow through with
--delete even when these link_stat errors show up... but I don't really want
to ignore all errors.  I just want *this* error to go away.

Any ideas as to what I should do?  Am I even reading this problem correctly?

As a stopgap, I could manually remove these problem links (there are only a
few of them).  But, I don't know where they are.  So, as a bonus question, how
might I use 'find' to find the links?  I tried 
  find . -lname '*fourier*'
but that didn't seem to work.


-- 
--John Gruenenfelder    Research Assistant, UMass Amherst student
                        Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS  --  http://weaselreader.org
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max



More information about the tfug mailing list