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

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: s3sync: Content-Length 0  (Read 3911 times)
js
Newbie
*
Posts: 2


View Profile
« on: August 04, 2007, 12:38:50 PM »

Hi,

I am new to ruby and s3sync. It appears to be almost working. I can list buckets and put and get files, but the files are all zero length.

s3sync.rb -v -d s3sync.tar.gz bucketname:again

Trying command put bucketname again2/s3sync.tar.gz #<S3::S3Object:0xb7d68220> x-amz-acl public-read Content-Type application/x-gzip Content-Length 0 with 100 retries left

The file is Size: 26667

ruby 1.8.4 (2005-12-24) [i386-linux]

Does it relate to
headers['Content-Length'] = FileTest.size(file).to_s

Thanks, Jerry
Logged
ferrix
Sr. Member
****
Posts: 363


(I am greg13070 on AWS forum)


View Profile
« Reply #1 on: August 04, 2007, 01:01:13 PM »

You can't use s3sync with a file argument, only a directory.  This limitation may go away in the future, but probably not.  If you are desperate to transfer a single file you can use s3cmd with the "put" command.
Logged
js
Newbie
*
Posts: 2


View Profile
« Reply #2 on: August 04, 2007, 09:32:02 PM »

Thank you clarifying that this only works with directories.

Is there a routine way for s3cmd.rb to find its include files? I put these scripts in my path, but they error because the required files do not have fully qualified paths. Does ruby have a variable for relative to the script path?

Thanks, Jerry
Logged
ferrix
Sr. Member
****
Posts: 363


(I am greg13070 on AWS forum)


View Profile
« Reply #3 on: August 05, 2007, 02:01:24 AM »

I actually don't know the answer.. if you are putting the script and the satellite files in different places, maybe define that to be part of the ruby library path?  (I'm not much of a ruby expert..)

I keep them all together, and stand with the current directory as the s3sync dir.  From there I use "full paths" to indicate the operands.
Logged
lowflyinghawk
Jr. Member
**
Posts: 52


View Profile
« Reply #4 on: September 03, 2007, 06:48:40 PM »

export RUBYLIB=/path/to/your/libraries

e.g. if
  require 'blah'

and /path/to/blah then

export RUBYLIB=/path/to
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!