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

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: support for amazon reduced redundancy storage (rrs)  (Read 4015 times)
naru
Newbie
*
Posts: 1


View Profile
« on: May 24, 2010, 01:19:03 PM »

title says it all:

support RRS as a storage option using s3sync.

is anybody actively working on s3sync anymore?

cheers
naru

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


(I am greg13070 on AWS forum)


View Profile
« Reply #1 on: May 25, 2010, 08:02:05 AM »

Not actively, but I still want to make a new one.  With a more pluggable design, too.
Logged
rolando.gff
Newbie
*
Posts: 1


View Profile
« Reply #2 on: June 12, 2010, 04:22:38 PM »

here's an untested patch, but it *should* work :-P
I made it while waiting for my first backup upload to finish, so I'll try it later.

Code:
--- s3sync.rb 2008-06-16 15:30:48.000000000 -0400
+++ s3sync_rrs.rb 2010-06-12 17:19:29.000000000 -0400
@@ -68,7 +68,8 @@
            [ '--cache-control',  GetoptLong::REQUIRED_ARGUMENT ],
            [ '--exclude',        GetoptLong::REQUIRED_ARGUMENT ],
    [ '--make-dirs', GetoptLong::NO_ARGUMENT ],
-   [ '--no-md5', GetoptLong::NO_ARGUMENT ]           
+   [ '--no-md5', GetoptLong::NO_ARGUMENT ],
+   [ '--reduced-redundancy', GetoptLong::NO_ARGUMENT]
    )
   
  def S3sync.usage(message = nil)
@@ -80,7 +81,7 @@
   --ssl     -s          --recursive   -r     --delete
   --public-read -p      --expires="<exp>"    --cache-control="<cc>"
   --exclude="<regexp>"  --progress           --debug   -d
-  --make-dirs           --no-md5
+  --make-dirs           --no-md5             --reduced-redundancy
 One of <source> or <destination> must be of S3 format, the other a local path.
 Reminders:
 * An S3 formatted item with bucket 'mybucket' and prefix 'mypre' looks like:
@@ -503,6 +504,7 @@
  debug(@path)
  headers = {'Content-Length' => (fromNode.size.respond_to?(:nonzero?) ? fromNode.size.to_s : '0')}
  headers['x-amz-acl'] = 'public-read' if $S3syncOptions['--public-read']
+ headers['x-amz-storage-class'] = 'REDUCED_REDUNDANCY' if $S3syncOptions['--reduced-redundancy']
  headers['Expires'] = $S3syncOptions['--expires'] if $S3syncOptions['--expires']
  headers['Cache-Control'] = $S3syncOptions['--cache-control'] if $S3syncOptions['--cache-control']
  fType = @path.split('.').last
@@ -732,4 +734,5 @@
 end
 
 # go!
-S3sync::main
\ No newline at end of file
+S3sync::main
+
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!