Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating bash script to store backup files on Rackspace (mosso). For now i am done with uploading and deleting files from containers.

Next step is to remove files older than two weeks (remove from container).

The questions is how to get metadata from object? e.g on uploading i am creating metadata for objects (Created Date) to store timestamp.

  1. I have some files on my hosting (different than cloud): dbbackup.tar.gz dbbackup2.tar.gz dbbackup3.tar.gz
  2. running cron to upload that files into Rackspace Files -cron:
    1. delete old files (older than 2 weeks)
    2. upload new backup files
    3. add metadata (Created Date, Content Type)

The issue is in 2.1 (Deleting) i don't see file created date in Rackspace Cloud interface and i don't see it also in http headers.

I need that data to check expiration date for the given file. So the question is HOW TO GET MY CUSTOM ADDED METADATA to use in calculations ?


share|improve this question
You should make the question summary more specific. – gareth_bowles Jan 6 '10 at 23:57
up vote 1 down vote accepted

I think what you're looking for is to use a HEAD on the object to get the X-Object-Meta-CreatedDate (sic) custom info that you added in 2.3. See page 23 of the API manual:


The only required header to be sent in the request is the authorization token. Sample request:

HEAD /<api version>/<account>/<container>/<object> HTTP/1.1
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb


No response body is returned. Metadata is returned as HTTP headers. A status code of 204 (No Content) indicates success, status 404 (Not Found) is returned when the Object does not exist.

Sample response:

HTTP/1.1 204 No Content
Date: Thu, 07 Jun 2007 20:59:39 GMT
Server: Apache
Last-Modified: Fri, 12 Jun 2007 13:40:18 GMT
ETag: 8a964ee2a5e88be344f36c22562a6486
Content-Length: 512000
Content-Type: text/plain; charset=UTF-8
X-Object-Meta-Meat: Bacon
X-Object-Meta-Fruit: Bacon
X-Object-Meta-Veggie: Bacon
X-Object-Meta-Dairy: Bacon


I think your question is better for Stack Overflow than Server Fault...

share|improve this answer
Thanks for the clear answer! – minnur Jan 11 '10 at 20:57
You're welcome, hey I learned a little something as well. :) You should mark this question as accepted (solved) so that it disappears off the unanswered stack... – troyengel Jan 13 '10 at 18:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.