The free forums are no longer in use. It remains available as read-only archive.
The forums are currently locked and only available for read only access
Does Xcloner cleanup older backups from Amazon S3
February 20, 2012
4:52 pm
4:52 pm
John
Member
Members
Forum Posts: 3
Member Since:
February 20, 2012
February 20, 2012
Offline
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
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
Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
D: 21
Andy: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 738
Members: 10049
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
ISIDORO ILARDOModerators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0
© Simple:Press —