Ask Your Question

Container sync from Rackspace CloudFiles

asked 2015-09-23 15:53:21 -0500

gsvi gravatar image


I would like to sync my containers that are currently located on CloudFiles. I would like CloudFiles to be the source and push the updated containers to my private Swift cluster.

I have found the following article on how to push data to CloudFiles. (

  • I am looking for information on how to do the reverse.. pushing object from CloudFiles to my Swift cluster.
  • Also I am curious how often the syncing process is initiated on cloudfiles.

I have configured my cluster to accept the rackspace api url via container-server.conf.



and I have set the headers via the following script

container = pyrax_connection.cloudfiles.get_container(container_name)

log.debug('Got all the container.  About to check metadata on container_name {0}...'.format(container_name))

d = container.get_metadata()'Metadata...{0}'.format(d))

sync_host_header = d.get('x_container_sync_to')

log.debug('{0} has valid sync_host header? {1}'.format(
    sync_host_header and sync_host_header == sync_host))

set_header = True

if sync_host_header is not None:
    if sync_host in sync_host_header:
        set_header = False
if set_header:"Setting Sync headers on {0}.".format(container))

    sync_container_header = sync_host + container_name

        'X-Container-Sync-To': sync_container_header})
        'X-Container-Sync-Key': secret_key})'Verified container {0} have sync_host headers set to allow '
         'access from {1}.'.format(container_name, sync_host))

Any advise would be appreciated.

Thanks Greg

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-09-23 19:52:14 -0500

gsvi gravatar image

Heard from Rackspace..

You can sync data to CloudFiles but you cannot sync data to CloudFiles.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-09-23 15:53:21 -0500

Seen: 145 times

Last updated: Sep 23 '15