[Tfug] rsync question
Nate
nate at torzo.com
Thu Apr 3 10:03:24 MST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I see this quite often because rsync has 2 distinct phases. The first
phase is the filesystem traversal. It's where it gathers information on
what files are on the local and remote sides. Then the next phase is
the sync'ing part to make the remote look like the local or vise versa
depending on how you're using it. So I see this error when a file gets
deleted between the time that it did phase one and phase two. It says
the file should be there, but it isn't. So it's basically a race
condition. If you run rsync again, it shouldn't output the same error
if it's what I'm thinking it is. I could be completely off, though..
rsync can be a complicated beast with devils in all the details.
Nate
John Gruenenfelder wrote:
> 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.
>
>
- --
Nate
System Admin Manager
System Administration
Ext 220
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH9Q3bRMRYK1K/wKQRAlD3AJoD8k8x7+/hsYdCdNBzottC3PuUzQCgoLKb
m6rbV77nrPniT7fgem55vgM=
=thRT
-----END PGP SIGNATURE-----
More information about the tfug
mailing list