Step 1, make a container named "export" under Storage > Files inside the rackspace cloud control panel.
Step 2, customize this script and run it on any unix machine OR read the docs below it to see other methods.
#!/bin/bash
sudo apt-get install python-dev gcc python-pip
sudo pip install swiftly eventlet
SWIFTLY_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0
# your Rackspace cloud username
# Username used to login to control panel
SWIFTLY_AUTH_USER=myuser
CUSTOMERID=123456798
# your Rackspace cloud API key
# Find the APIKey in the 'account settings' part of the menu of the control panel
APIKEY='fake0u23jiofds9032ijofds09823rijpo'
SWIFTLY_AUTH_KEY=$APIKEY
# 3 char region code for where your exported image is located (e.g., ORD)
SWIFTLY_REGION=DFW
REGION_EXPORTING_FROM=dfw
# what you want the downloaded image file to be named
LOCALFILENAME=MyDownloadedServer
# the container in Cloud Files containing your exported image
CONTAINER=export
# Find the image ID you'd like to make available on cloud files
# set the image id below of the image you want to copy to cloud files, see in control panel
IMAGEID=fake581e-c14561-3c46-45687-e045646675
IMAGEFILENAME=$IMAGEID # the name of your exported image in Cloud Files
# This section simply retrieves the TOKEN
TOKEN=$(curl -s https://identity.api.rackspacecloud.com/v2.0/tokens -X POST -d '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"'${SWIFTLY_AUTH_USER}'","apiKey":"'${APIKEY}'"}}}' -H "Content-type: application/json" | python -c 'import json, sys; data = json.loads(sys.stdin.read()); print data["access"]["token"]["id"]')
# IMPORTANT: change receiving_swift_container to whatever $CONTAINER is
# This section requests the Glance API to copy the cloud server image uuid to a cloud files container called export
curl "https://$REGION_EXPORTING_FROM.images.api.rackspacecloud.com/v2/$CUSTOMERID/tasks" -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" -d '{"type": "export", "input": {"image_uuid": "'"$IMAGEID"'", "receiving_swift_container": "export"}}'
# The above command simply set a pending command. Go play a game while it finishes.
sleep 4h;
swiftly --auth-url=$SWIFTLY_AUTH_URL --auth-user=$SWIFTLY_AUTH_USER --auth-key=$SWIFTLY_AUTH_KEY --region=$SWIFTLY_REGION --verbose get --output=${LOCALFILENAME} ${CONTAINER}/${IMAGEFILENAME}
For more info;
1) Exporting the image to Cloud Files
You can export the image from Rackspace to your Cloud Files containers using the API. The article below can guide you through that process.
Exporting Cloud Server Images from the Rackspace Cloud
https://community.rackspace.com/products/f/25/t/7089?_ga=1.161905660.1332227198.1487618904
There is also a tool you can use called ‘Pitchfork’. Once you log into Pitchfork using your username and API key, you would navigate to the ‘Images’ section and choose ‘Export’. Once you run that API call, some time will pass before you see the image in one or multiple Cloud Files containers.
Pitchfork: https://pitchfork.rax.io/
https://community.rackspace.com/products/f/25/t/6432?_ga=1.161936636.1332227198.1487618904
2) Downloading image from Cloud Files
You can use Swiftly to download the image from Cloud Files. An object in Cloud files cannot be greater than 5GB. If your image is greater than this, it will be divided into multiple Cloud files objects, which can be downloaded and reassembled locally using Swiftly.
https://support.rackspace.com/how-to/use-swiftly-to-download-an-exported-image/