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

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Calling s3sync.rb from cron, s3config.yml not getting found  (Read 4372 times)
cleaner416
Newbie
*
Posts: 1


View Profile
« 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?
Logged
ferrix
Sr. Member
****
Posts: 363


(I am greg13070 on AWS forum)


View Profile
« Reply #1 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?
Logged
ledjon
Newbie
*
Posts: 1


View Profile
« Reply #2 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
Logged
IanTegebo
Newbie
*
Posts: 1


View Profile
« Reply #3 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
  • move all *.rb files into ~/lib/ruby/1.8/s3sync
  • while putting s3{sync,cmd}.rb into ~/bin
  • Then you need to update each of the libraries to have require s3sync/LIBRARYNAME
  • Finally, set this environment variable in your login scripts, RUBYLIB=~/lib/ruby/1.8.
Logged
ferrix
Sr. Member
****
Posts: 363


(I am greg13070 on AWS forum)


View Profile
« Reply #4 on: January 06, 2008, 10:46:43 AM »

A nice fix for this will be coming today.  Watch announce.
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!