AWS S3 reduced redundancy option | Joomla Support | Forum Archive

The free forums are no longer in use. It remains available as read-only archive.

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
The forums are currently locked and only available for read only access
sp_TopicIcon
AWS S3 reduced redundancy option
April 22, 2012
1:14 pm
Avatar
ben
New Member
Members
Forum Posts: 2
Member Since:
April 22, 2012
sp_UserOfflineSmall Offline

I have used xcloner for a few months to move websites from one host to another and also to perform a regular nightly backup of important data.

 

The backup runs and transfers the backup to an FTP server I run at home as well as an AWS S3 bucket.

now that AWS can use reduced redundancy storage (at half the cost of the normal storage) then I would like to use this by default. There is no option I can see in the xcloner admin menu to change the S3 put request so I figure this will need a manual change of the code.

 

I assume that the correct place to do this is in the cloner.cron.php file around the line:

"if ($s3->putObjectFile($clonerPath."/".$file, $_CONFIG['cron_amazon_bucket'], $_CONFIG['cron_amazon_dirname']."/".baseName($file), "private")){"

but I don't know the correct syntex to add the "reduced_redundancy" into the put request.

 

could anyone help out please?

 

Kind regards

Ben

April 23, 2012
9:06 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

You will probably need to add the reduced_redundancy code inside the classes/S3.php class file, however I am not  yet familiar with that option... so i can't give any real pointers.

 

Let me know If you do manage to get it working! Cheers, Ovidiu

April 23, 2012
7:43 pm
Avatar
ben
New Member
Members
Forum Posts: 2
Member Since:
April 22, 2012
sp_UserOfflineSmall Offline

I'm having a little sucess – or failure depending on how you look at it.

I think that I've got the syntax right but I'm getting these errors on the cron report

Warning: S3::putObject(): [SignatureDoesNotMatch] The request signature we calculated does not match the signature you provided. Check your key and signing method. in /***/S3.php on line 361

Warning: S3::putBucket(daftveggiebackup, private, ): [BucketAlreadyOwnedByYou] Your previous request to create the named bucket succeeded and you already own it. in /***/S3.php on line 229

 

the code I've put in is (starting with the original $buckets line)

$buckets = $s3->listBuckets();

$newput =  S3::putObject($clonerPath."/".$file, $_CONFIG['cron_amazon_bucket'],  $_CONFIG['cron_amazon_dirname']."/".baseName($file),"private", array(), array("x-amz-storage-class" => "REDUCED_REDUNDANCY"));

 

if (($s3->putBucket($_CONFIG['cron_amazon_bucket'], "private")) || (@in_array($_CONFIG['cron_amazon_bucket'], $buckets))) {

    if (var_dump($newput)){

(no changes after here)

 

I've taken the code from http://undesigned.or.....umentation

 

Any ideas on how to make this actually work now!

Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
Andy: 21
D: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 738
Members: 10053
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
piotr K
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0