Problem in saving backups to Amazon S3 (using Cron or SSH) | Wordpress 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_Feed Topic RSSsp_TopicIcon
Problem in saving backups to Amazon S3 (using Cron or SSH)
February 19, 2011
3:15 pm
Avatar
Sachin
India
Member
Members
Forum Posts: 4
Member Since:
February 19, 2011
sp_UserOfflineSmall Offline

After executing cron command via SSH, the local backup was successful. But, there's a problem in saving backup to Amazon S3 bucket.

Here is the error message:

<b>AMAZON S3: Starting communication with the Amazon S3 server...</b><br />
<br />
<b>Warning</b>:  S3::listBuckets(): [77] error setting certificate verify locations:
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
 in <b>/home/path/to/wordpress/installation/wp-content/plugins/xcloner-backup-and-restore/classes/S3.php</b> on line <b>93</b><br />
<br />
<b>Warning</b>:  S3::putBucket(Example, private, ): [77] error setting certificate verify locations:
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
 in <b>/home/path/to/wordpress/installation/wp-content/plugins/xcloner-backup-and-restore/classes/S3.php</b> on line <b>229</b><br />
<b>AMAZON S3: Unable to create bucket Example (it may already exist and/or be owned by someone else)!</b><br />

-------------------------

I've replaced my S3 bucket name with "Example".

This bucket is owned by me & my Access key pairs were correct (I've checked it multiple times). Also, there's no need to create a new bucket each time the cron job is executed..

Please, help!

February 19, 2011
3:44 pm
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Hi Sachin! The issue you seem to have is related to a curl install miss-configuration on the server, please refer to this blog post, it should help http://chrisschuld.c.....locations/

 

Let me know if you still have issues! Ovidiu

February 19, 2011
8:38 pm
Avatar
Sachin
India
Member
Members
Forum Posts: 4
Member Since:
February 19, 2011
sp_UserOfflineSmall Offline

Still with error! I am unable to do more than fresh Curl re-install.

Perhaps, I need private SSL (a guess because of .crt file).

Is there any other methods or solutions?

February 19, 2011
8:46 pm
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

A solution would be to disable the ssl usage, so open the wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php and replace this line(around 292 line):

 

$s3 = new S3($_CONFIG['cron_amazon_awsAccessKey'], $_CONFIG['cron_amazon_awsSecretKey']);

 

with

 

$s3 = new S3($_CONFIG['cron_amazon_awsAccessKey'], $_CONFIG['cron_amazon_awsSecretKey'], false);

 

Let me know if it worked! Ovidiu

February 19, 2011
10:31 pm
Avatar
Sachin
India
Member
Members
Forum Posts: 4
Member Since:
February 19, 2011
sp_UserOfflineSmall Offline

The first problem has been fixed with your method. But, there're others to prevent the backup being successful.

Here is the error message:

<b>AMAZON S3: Starting communication with the Amazon S3 server...</b><br />

<br />

<b>Warning</b>:  S3::putBucket(MyBucket, private, ):
[BucketAlreadyExists] The requested bucket name is not available. The
bucket namespace is shared by all users of the system. Please select a
different name and try again. in
<b>/path/to/wordpress/installation/wp-content/plugins/xcloner-backup-and-restore/classes/S3.php</b>
on line <b>229</b><br />

<br />

<b>Warning</b>:  S3::putObject(): [AccessDenied] Access
Denied in
<b>/path/to/wordpress/installation/wp-content/plugins/xcloner-backup-and-restore/classes/S3.php</b>
on line <b>361</b><br />

<b>AMAZON S3: Failed to copy file to
{MyBucket}/Destination/Directory/in/Amazon/S3/backup_2011-02-19_16-07_gamingcheater.com-sql-nodrop.tgz</b><br
/>

-----------------

I've replaced Bucket name with "MyBucket".

The Bucket
is owned by me. Its not shared at all. The bucket is accessed by few
(less than 10) applications. At the time of cron job execution, no other
app was accessing that bucket.

Is there something broken if it comes to backup in existing buckets?

Please, look around it..

February 20, 2011
8:14 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

The error you are showing up seems to be related to a permission issue to your amazon account, the script is unable to upload the backup to the specified bucket. The script usually tried to create a bucket if it does not exists, however from the error above it doesn't seem to be allowed to access that bucket name.

Try and use another name for your bucket, make sure it's something more unique and see if it helps.

 

Ovidiu

February 20, 2011
9:48 am
Avatar
Sachin
India
Member
Members
Forum Posts: 4
Member Since:
February 19, 2011
sp_UserOfflineSmall Offline

1. I am using other apps to upload using the same credentials. Means, my permission is Ok.

2. After using a unique bucket name, I'm facing the same problem. After cron job execution, I've created a bucket (using AWS console) having same name successfully. Means, the bucket name was unique.

Now, I can confidentally say "There's something broken in XCloner S3 script."

February 20, 2011
10:18 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Could you post here a screenshot of your amazon s3 config details, except of course your private keys, to see if we can spot something there. We are using the amazon upload feature without issues from here, but again, we can't really test all enviroments.

 

We could help you better if we would have access to your cron script and try our amazon details to see if it's something related to XCloner, so if you like, feel free to open a support ticket and send us the XCloner admin details there.

 

As  a suggestion, could you try a localhost install and see if you have any issues uploading with the same S3 details, it might help identifying where the issue is.

 

Ovidiu

February 24, 2011
8:14 am
Avatar
Andrey
Member
Members
Forum Posts: 4
Member Since:
February 24, 2011
sp_UserOfflineSmall Offline

Hello,

I have some errors:

 

AMAZON S3: Starting communication with the Amazon S3 server...
Warning: S3::putObject(): [28] Operation timed out after 10 seconds with 0 bytes received in ........./xcloner-backup-and-restore/classes/S3.php on line 361
AMAZON S3: Failed to copy file to {akonstrubackup}/backup/backup_2011-02-24_10-41_akonst.ru-sql-nodrop.tar

 

How I can fix it?

Thanks!

February 24, 2011
10:01 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Hi Andrey! The error seems to be related to cURL, you need to check if:

 

1. are you able to ping within your server this address s3.amazonaws.com , if not, the server provider might be blocking dns resolve requests within the server

2. is there any firewall on the server that could affect the communication with the amazon server?

 

This url might be of good use http://www.geekhelpg.....d-error/ , it seems there is a plugin called Core Control which you can use to test aspects of the http transport protocols.

 

 Hope it helps! Ovidiu

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: 10030
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Emmanuel Joachim
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0