Dwayne,
I don't know of any existing applications that will do this, however using the official Rackspace Python SDK, pyrax we can achieve your goal. pyrax does not contain fully built out functions required to perform this, but I spent a few minutes and put something together by extending the default functionality of pyrax.
You can find the code at https://gist.github.com/5602713
At the very bottom of the code, you would need to update myusername
with your real username, myapikey
with your real api key, the 2 places with the appropriate region (which may already be DFW), some-container
with the real container name, and /path/to/some/local/directory/
with the local directory you want it to sync down to.
The way that sync_container_to_folder
is called towards the bottom of the script, will delete any local files that do not also exist remotely, working similarly to the --delete
argument for rsync. You can add delete=False
to prevent that functionality, such as:
cf.sync_container_to_folder('some-container',
'/path/to/some/local/directory/',
delete=False)
The options for sync_container_to_folder
are very similar to that for the built in function from pyrax, sync_folder_to_container
, as documented at https://github.com/rackspace/pyrax/blob/master/docs/cloud_files.md#syncing-a-local-folder-with-a-container
I've tested on some small containers, nothing big, and can confirm it seems to be working well. But just to be safe, you may want to test things with a test container, and an empty local directory first.
BTW: You will need to install the pyrax module and the python-dateutil module to use this. These are not standard python modules.