Title: Calling s3sync.rb from cron, s3config.yml not getting found Post by: cleaner416 on September 18, 2007, 04:34:47 PM First off, thanks for the development of this great tool.
I am trying to automate my syncs via cron, but I'm having some trouble with syntax and getting the script to pickup s3config.yml. I'm using this command: (Fedora FC5) /usr/bin/ruby /root/s3sync/s3sync.rb -r --ssl /my_dir_to_backup bucket:pre Unfortunately, this command only works when I'm in /root/s3sync, and elsewhere errors on the require s3config line (~19). Is there a way to pass the path of the s3config.yml manually? Title: Re: Calling s3sync.rb from cron, s3config.yml not getting found Post by: ferrix on September 18, 2007, 05:11:04 PM I don't use the yml myself.. I just cd to the s3sync dir before issuing my commands. Someone familiar with yml maybe could help?
Title: Re: Calling s3sync.rb from cron, s3config.yml not getting found Post by: ledjon on September 24, 2007, 08:18:45 AM Just change your process to "cd" to the directory where s3sync.rb (and I assume s3config.yml) is installed at. For example:
cd /root/s3sync && /usr/bin/ruby ./s3sync.rb -r --ssl /my_dir_to_backup bucket:pre Since you're fully qualifying the path to backup, the location the script runs from doesn't matter for the process, so this just starts it out in the "installed" directory. - Jon Title: Re: Calling s3sync.rb from cron, s3config.yml not getting found Post by: IanTegebo on November 29, 2007, 04:38:27 AM I updated s3config.rb to use
Code: "#{ENV['HOME']}/.s3config.yml" instead of Code: 's3config.yml .But then you might want to take this a step further and
Title: Re: Calling s3sync.rb from cron, s3config.yml not getting found Post by: ferrix on January 06, 2008, 10:46:43 AM A nice fix for this will be coming today. Watch announce.
|