rsync not running with upstart
bert at flexwebhosting.nl
Fri May 3 03:28:07 MDT 2013
I need some help by solving a strange problem:
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),
rsync all servers
wait till next day
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)
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.
More information about the rsync