On a Redhat ES 3 system running rsync-2.5.7-5.3E I have a script which
sends files to
other servers. I have noted lately that occasionally rsync will exit
with a code of 0 prematurely.
See below a snippet of the code I am using :
if [ ! -s $file ]
then
# File does not exist or is non-zero
echo "file $file does not exit or is 0 size" >> $LOGFILE
fi
echo "About to rsync at `date`" >> rsync.out
if rsync -e rsh -av --timeout=60 `cat list` $SYS:/file_in >>
rsync.out 2>&1
then
echo "completed rsync successfully at `date`" >> rsync.out
date >> filesent
cat list >> filesent
/bin/rm `cat list`
fi
See below for a example of the failure in the rsync.out file :
- note the two echo outputs. The exit status from rsync was
successful(ie 0).
- the rsync output appears after the "completed ..." line in the file.
- rsync reports the file as missing however this is probably due to the
rm ocurring BEFORE the transfer is complete.
- the before the transfer guarentees the file is there.
Any ideas ?
About to rsync at Sat Dec 17 04:55:54 MST 2005
completed rsync successfully at Sat Dec 17 04:55:54 MST 2005
building file list ... link_stat FILE.234 : No such file or directory
done
wrote 25 bytes read 20 bytes 30.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at main.c(620)
--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html