turbolift is an absolutely brilliant utility for manipulating RackSpace Cloud Files. With turbolift you can do things like:
- Upload a directory, (recursively)
- Upload a single file
- Upload a local directory (recursively) and sync it with a Cloud Files Container
- Download a Container to a local directory
- Download changed objects from a Container to a local directory
- Compresses a Local Directory, then uploads it
- List all Containers
- List all Objects in a Container
- Delete an Object in a Container
- Delete an entire Container
- Clone one Container in one region to another Container in the same or Different Region.
- Set Custom headers on Objects/Containers
So in this article I’m going to demonstrate how to clone a container.
Here’s the download link for turbolift:
On CentOS 6.5 the install is easy:
yum install python-devel python-setuptools
git clone git://github.com/cloudnull/turbolift.git
python setup.py install
Now lets assume that we have a container on RackSpace Cloud Files name “devimages” and we want to copy or clone the contents of that container to another container named “prodimages”. Here’s the turbolift command:
turbolift -u [USERNAME] \
-a [APIKEY] \
--os-rax-auth [SOURCE REGION] \
-sc devimages \
-tc prodimages \
-tr [DESTINATION REGION]
The [SOURCE REGION] and [DESTINATION REGION] should be one of ’dfw’, ‘ord’, ‘iad’, ‘lon’, ‘syd’ or ‘hkg’.
turbolift is fast – it takes about 10 minutes to clone a 2GB container with 18K objects in the same region.