0

I am currently writing a php backup script that backs up a website and its mysql databases to Rackspace CloudFiles. I have the script working well, except I don't know how to set the expire headers so the backups are automatically deleted after 7 days. As far as I can find, Rackspace has not documented the PHP API very well.

This is what I am trying to do, in reference to their regular API documentation.

http://docs.rackspace.com/files/api/v1/cf-devguide/content/Expiring_Objects-e1e3228.html

Thanks for your help!

Mike George
  • 521
  • 3
  • 11
  • 27

1 Answers1

0

I think that you just have to add X-Delete-At header to the file.

$object->headers = array('X-Delete-At'=> 1339429105); // unix timestamp
$obj->sync_metadata();
pvledoux
  • 973
  • 1
  • 10
  • 23