Recently, I ran rsync and got the following message: skipping non-regular file "981005_plteph-de405s.bsp" It turns out that the file in question is really a degenerate link that points back to itself. lrwxr-xr-x 1 18450 other 24 May 9 20:38 981005_plteph-de405s.bsp -> 981005_PLTEPH-DE405S.bsp The confusing this is that although rsync printed what looks like an error, it still returned a status of zero (i.e. success). My question is: what should rsync do in such a case? The options I see are: 1) create the degenerate link on the remote machine (with or without a warning) and return a status of zero. 2) don't create the degenerate link on the remote machine, print an error message and return a status other than zero. The degenerate link was simply a mistake on our part. But, the only reason I caught it was that I happened to see the error message buried in several hundred lines of verbose output. My script checks the return status of rsync, but in this case, it indicated success even though rsync didn't copy the degenerate link. Also, it doesn't seem outrageous that someone, somewhere would intend to create such a degenerate link. In that case, what should rsync do? Considering this case, I would tend to favor option one above even though that means I wouldn't have had any indication of an error. Are there any other cases like this where rsync doesn't copy something from the source to the destination, prints a warning but still returns success? For reference, my command line looks like this. rsync --verbose --checksum --recursive --copy-unsafe-links --times --rsh=ssh --rsync-path=/usr/local/bin/rsync --delete --timeout=30 --ignore-times --compress /source/directory user@machine:/destination/directory Marc --
On Thu, May 15, 2003 at 02:56:45PM -0700, Marc Sarrel wrote:> Recently, I ran rsync and got the following message: > > skipping non-regular file "981005_plteph-de405s.bsp" > > It turns out that the file in question is really a degenerate link > that points back to itself. > > lrwxr-xr-x 1 18450 other 24 May 9 20:38 > 981005_plteph-de405s.bsp -> 981005_PLTEPH-DE405S.bspThat doesn't point to itself, it points to a presumably non-existant file with a slightly different name.> The confusing this is that although rsync printed what looks like an > error, it still returned a status of zero (i.e. success).Not an error. Merely a notice.> My question is: what should rsync do in such a case? The options I see > are: > > 1) create the degenerate link on the remote machine (with or without > a warning) and return a status of zero. > > 2) don't create the degenerate link on the remote machine, print an > error message and return a status other than zero.Rsync did exacly what you told it to do. I reviewed your command-line below and i see no --links option. You have instructed it to copy unsafe links and skip safe ones.> rsync --verbose --checksum --recursive --copy-unsafe-links --times > --rsh=ssh --rsync-path=/usr/local/bin/rsync --delete --timeout=30 > --ignore-times --compress /source/directory > user@machine:/destination/directory-- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt
Possibly Parallel Threads
- Trouble using Ecdf () from the Hmisc library
- [PATCH] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0
- [RFC][PATCH 1/2] Btrfs: try to allocate new chunks with degenerated profile
- [PATCH] nouveau/video: make sure that firmware is present when checking caps
- predict(backSpline(x)): losing my marbles?