rsync --lots-of-options $SRC $DEST EXIT=$? if [ $EXIT -eq 0 ] then echo "Yay, we are all good: [$EXIT]" else echo "Oh noes, bad things happened: [$EXIT]" fi
...you end up with spurious error reports giving you high blood pressure.
So the obvious solution is to make the if condition for error code 0 or 24, and only spit out "Oh Noes" if it was something different. It took me a while to get the syntax right:
if [ \( $EXIT -eq 0 -o $EXIT -eq 24 \) ]
Have you ran into many error code 23s? I have to allow those as well, as I get them every run on a 'live' system hold home directories over an AFP share. From what I can tell, it's obscure permissions on certain files, bizarre characters in filenames, or files that were modified after rsync indexed. In any event, the integrity of the backup seems fine.
ReplyDeleteJoshua, that does sound familiar - looking at the revision history, we started to run into troubles with our old mail system, which would do wacky things with inactive user accounts, making them unreadable, or unwritable. Our solution was to start using --exclude-from to read the directories to skip from a file.
ReplyDeleteI see a few other people out there suggesting that symlinks can also cause error code 23 - maybe try rsync -a to evade issues with symlinks?