I'm trying - like many other people - to rsync data between gears of a scalable app.
I have created a minutely cron file that gets executed and can get and parse a list of gears. It can then determine which ones are NOT the local gear and then tries to rsync the app-root/data folder of each gear to the $OPENSHIFT_DATA_DIR (should be on local gear)...
The first part works, but the rsync command fails with:
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
I have tried about a dozen variants of
rsync -avz -e "ssh -i ${OPENSHIFT_DATA_DIR}.ssh/id_rsa" [email protected]:app-root/data/test/ ${OPENSHIFT_DATA_DIR}test
$targetgear is a variable from parsing the list of gears - it's the long string of "stuff" in the gear name... the script loops through the csv list provided by haproxy and correctly writes what it finds to a log file, so I know it's getting at least that far...
The id_rsa file exists and has been added to the account in the web control panel.
Any help or pointers would be greatly appreciated. I have combed pages and pages of forum posts and documentation on rsync and ssh, but can't seem to get around it...
Thanks in advance.
ssh -i ${OPENSHIFT_DATA_DIR}.ssh/id_rsa [email protected] hostname
shows you something? – Raul Andres$targetgear@$targetgear-user.rhcloud.com
... – brainstormtrooper