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

Login with username, password and session length
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / Questions / s3sync works from shell but not cron job on: May 05, 2009, 08:21:42 AM
Hi,

My s3sync script to back up a folder to S3 works fine when I run it from command prompt, But when I use the same script in the cron job, it fails

Script:

#!/bin/bash
 # script to upload local directory upto s3
 export AWS_ACCESS_KEY_ID=vvv
 export AWS_SECRET_ACCESS_KEY=vvv
 export AWS_CALLING_FORMAT=REGULAR
 export SSL_CERT_DIR=vvv

 date_time=$(date)
 check="1"
 NUM_BUCKETS=$(/usr/bin/ruby s3cmd.rb list hellobucket:$hostname | wc -l)
 NAME=$(hostname)
 if [ $NUM_BUCKETS != $check ]
 then
 echo "$date_time:Bucket exists. Syncing the files!"
 /usr/bin/ruby /root/s3sync/s3sync.rb -r --ssl --delete --debug /var/log/ hellobucket:$NAME
 else
 echo "$date_time : Creating new bucket"
 /usr/bin/ruby s3cmd.rb createbucket hellobucket:$NAME
 echo "$date_time : Syncing the files!"
 /usr/bin/ruby /root/s3sync/s3sync.rb -r --ssl --delete --debug /var/log/ hellobucket:$NAME
 fi
------------

s3sync cron:
*/5 * * * * /root/s3sync/./updatesync.sh >> /root/s3sync.log

2  General Category / Questions / Status message of /usr/bin/ruby s3cmd.rb list bucket:subdirectory on: May 01, 2009, 02:52:26 PM
Hi,

I'm trying to create a directory in the bucket if it does not exist.
Hence, I need to know the status of : /usr/bin/ruby s3cmd.rb list bucketname:subdirectoryname, depending on which I can create the 'subdirectory name' if it does not exist'
3  General Category / Questions / s3sync isnt uploading files with permission syslog.adm on: April 27, 2009, 01:13:48 PM
Hi

I'm performing a s3sync using this command -
ruby s3sync.rb -r --ssl --delete --debug /var/log/  syslogs:

This command is copying all the files in /var/log whose owner is root.root
Any files/folders owned by syslog.adm ( anyone other than root ) is neglected.

Any idea why?

4  General Category / General Discussion / S3_s3sync_modstring_to_format: Unsupported calling formauntime Error) on: April 21, 2009, 12:48:02 PM
If anyone is getting this problem on a s3sync.rb -r option then you will need to export $AWS_CALLING_FORMAT = REGULAR
if you have $AWS_CALLING_FORMAT = SUBDOMAIN and on your s3 bucket you do not have a subdomain, then  you will get this error.

Also, with 'REGULAR' the call to your ruby script will be like this -

ruby s3sync.rb -r --ssl --delete --debug /var/log/  syslogs:

where 'syslogs' is my main bucket.

Hope this helps someone...
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!