S3Sync.net
February 02, 2014, 01:37:34 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: sync from cron - ruby: command not found  (Read 2646 times)
seengee
Newbie
*
Posts: 11


View Profile
« on: December 13, 2007, 07:39:07 AM »

Hi,

I have created a script for backing up to s3, this runs fine when invoked from the command line by myself just running ./sync_wednesday.sh but when i attempt to run this script from a cron like this:

01 06 * * 4 root run-parts /home/s3sync/syncscripts/sync_wednesday.sh

i get an email saying:
/home/s3sync/syncscripts/sync_wednesday.sh: line 6: ruby: command not found

sync_wednesday.sh looks like this:

#!/bin/bash
# script to upload local directory upto s3
cd /home/s3sync/s3sync/
export AWS_ACCESS_KEY_ID=55555555555555555555555
export AWS_SECRET_ACCESS_KEY=55555555555555555555555555555
export PATH=/usr/local/bin:$PATH
ruby s3sync.rb -r --ssl --delete /backup/cpbackup/daily/  myBackup:serverName/wednesday/


the export PATH bit is just guesswork on my part, ruby is in that directory so i figured that might help but it doesnt.

any ideas?

Logged
ferrix
Sr. Member
****
Posts: 363


(I am greg13070 on AWS forum)


View Profile
« Reply #1 on: December 13, 2007, 09:05:50 AM »

Why not just make the command say /usr/local/bin/ruby then?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!