This is a discussion on Re: rsync error: some files could not be transferred -- How to within the Rsync forums, part of the Networking and Network Related category; On Apr 8, 2008, at 11:27 PM, Kenneth Seal <hunzinker@gmail.com> wrote: > Hi Wayne, > &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Apr 8, 2008, at 11:27 PM, Kenneth Seal <hunzinker@gmail.com> wrote: > Hi Wayne, > > I read your thread online at http://lists.samba.org/archive/rsync...ne/012847.html > and I am having a similar problem. > > In my case, rsync displays the error code "rsync error: some files > could not be transferred (code 23)" and it kills my script. Do you > have any advice on how would I go about writing, researching etc. a > script to tell rsync to ignore such errors? > > I am using the bash shell in Mac OS 10.5.2. Any help would be much > appreciated. > > Many thanks, > Ken > -- > To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html The result code of a command is stored in a special variable named $? Check the value of that variable in an if statement immediately after the rsync line in your script If the value is 0 then there were no errors. If the value is 23, then you could log a warning or not. If there is any other value in $? , then you have another problem. If we could see the relevant lines of your script we might be able to provide more help. Also you control whether your script succeeds or fails based on the last line in your script. If you want it to succeed, the last line would be exit 0 Google for advanced bash scripting guide for more info. Kyle -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html |
![]() |
| Thread Tools | |
| Display Modes | |
|
|