Does Xcloner cleanup older backups from Amazon S3 | General Questions and Support | Free Forums

 
You must be logged in to post Login Register


Register? | Lost Your Password?

Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

Does Xcloner cleanup older backups from Amazon S3

No Tags
UserPost

4:52 pm
February 20, 2012


John

Member

posts 3

I am using xcloner to backup my website to the local server, then have the backup copied to an Amazon S3 account.  Works great!

 

However, even though xcloner cleans up older backups on the local server, it appears it does not clean up backups from the Amazon S3 account.

 

Is there a way to get xcloner to perform clean up on the Amazon S3 account automatically?

 

Thank you,

 

jhannan

6:10 pm
February 20, 2012


XCloner! Support

Admin

posts 1362

At the moment, XCloner does not have that functionality built in, but it is on the dev list for a future version.

If you like to add it yourself, the code to edit is inside the cloner.cron.php file, and the amazon php class in classes/S3.php

 

Regards, Ovidiu

Please consider our XCloner Premium Support or making a Donation

XCloner.com – Backup Made Easy!

7:26 pm
February 21, 2012


John

Member

posts 3

Thank you for the response.  Any chance you would have an example of the command line syntax to use?  I have no idea how to word the command, what to call.  Perhaps you can provide an example of sending a file delete command?

 

Thank you,

 

jhannan

8:22 am
February 22, 2012


XCloner! Support

Admin

posts 1362

You will need to use the following method as defined in the S3 class

 

/**
* Delete an object
*
* @param string $bucket Bucket name
* @param string $uri Object URI
* @return boolean
*/
public static function deleteObject($bucket, $uri) {
$rest = new S3Request('DELETE', $bucket, $uri);
$rest = $rest->getResponse();
if ($rest->error === false && $rest->code !== 204)
$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
if ($rest->error !== false) {
trigger_error(sprintf("S3::deleteObject(): [%s] %s",
$rest->error['code'], $rest->error['message']), E_USER_WARNING);
return false;
}
return true;
}

so when calling it from the cloner.cron.ph you would use

 

$s3->$deleteObject($_CONFIG['cron_amazon_bucket'], $_CONFIG['cron_amazon_dirname']."/".baseName($file))

Hope it helps

Please consider our XCloner Premium Support or making a Donation

XCloner.com – Backup Made Easy!

9:14 pm
February 22, 2012


John

Member

posts 3

Thanks for the quick response!  Great support!

We are going to try this out and see if we can get it working.

 

Appreciate the help! Cool

No Tags

About the XCloner – Website Backup and Restore made simple Forum

Most Users Ever Online: 82

Currently Online: ewjfgueir
10 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 3
Forums: 7
Topics: 1549
Posts: 7533

Membership:

There are 11450 Members
There have been 737 Guests

There is 1 Admin
There is 1 Moderator

Top Posters:

Administrators: XCloner! Support (1362 Posts)

Moderators: Ovidiu – Support! (0 Posts)



 

Quick contact

place

Hi there, my name is Ovidiu Liuta and i support the XCloner! project
XCloner is a Joomla backup component, Wordpress backup plugin and Free website backup tool.
Contact me here!

About company

XCloner.com is a dynamic company focusing on providing backup and recovery solutions for small to medium websites.
We are based in Romania and offer 24/7 support through forums and our private ticket system for Premium users support.

Tweet tweet

twitter
© 2012 XCloner – Website Backup and Restore made simple
All Rights Reserved | Privacy Policy