The free forums are no longer in use. It remains available as read-only archive.
1:14 pm
April 22, 2012
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
7:43 pm
April 22, 2012
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!
1 Guest(s)