rsync not running with upstart

bert bert at flexwebhosting.nl
Mon May 13 02:26:04 MDT 2013


Thanks Francis,

Tried it but unfortunally it did not solve the problem.
The rsync process still exits with error 14.
Do you know what ipc codes are? I suppose it has something to do with inter process communication. But why would there a problem with ipc when running from upstart?


Kind regards


Bert.





--

Hi.

On Fri, 03 May 2013 11:45:24 +0200 bert wrote:
> When running the script from upstart, rsync exists with a error 14,
>  some error that has something to do ipc codes. (What are ipc codes?)

I think I saw that already. It was a bug in a library that assumes
that stdin stdout stderr are opened.

Try thus to open them in your script, for example:

    #!/bin/bash -p
    exec < /dev/null >& /tmp/backup.log

    rsync all servers
    wait till next day
    exit 0 ## 0 means success here

--
Francis

---


Hi all,

I need some help by solving a strange problem:

Situation:


I wrote a scrip that uses rsync to send backups to another server.
It does something like:


/usr/bin/rsync -azi --numeric-ids --exclude tmp --exclude var/spool/ --delete -e  ssh  root at 10.0.0.65:/ /storage/volumes/65


The script has a source file that dictates which servers to backup. E.g. several ip address are visited to copy data to a backup server.
When started on the commandline all works fine. All servers are backuped.
At the end of the script, a while statment combining a sleep and a date statement suspenses the script up to the next day before a new run is started.
In practice the script just exits when reaching the end of the wait(s),

#!/bin/bash

    rsync all servers
    wait till next day
    exit 1

This works fine under all Centos systems in previously and currently versions in use, from Centos 5.x (using inttab) and Centos 6x (using Upstart)

Problem:

when run from upstart, the script works only with Centos versions lower than 6.3;

When running the script from upstart, rsync exists with a error 14, some error that has something to do ipc codes. (What are ipc codes?)
The versions of rysnc are the same, 3.0.6.
As said when started from commandline, there is no error 14; all just works fine.
The script is in use now for along period of time, dating from Centos 5.2.

Why is rsync exiting with an error 14 when run from upstart? Running it from cron is no option because you always get problems with overlap or complicated
stuff to avoid dubble backups running. Upstart and inittab are fine tools for just avoiding that.

BTW commands such as scp do run. Besides the rsync, scp is used to copy serveral config files, that works fine. Just rsync fails.


Any help or suggestions are welcome. I already tried a lot of stuff but at this moment I am out of any ideas to solve this.


Regards,

Bert.




-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


More information about the rsync mailing list