How to synchronize a CDN folder to a local folder?

1k views Asked by At

Is there a way to synchronize a CDN container (cloudfiles to be more specific) to a local folder? Or is there a way to bulk a download a CDN container?

1

There are 1 answers

2
Kyle Kelley On

Though it doesn't seem to be actively maintained, there is CloudFuse. It's written in C and has to be compiled on your box (no packages available.

Luckily, there are articles for setting it up, but here's a rough summary:

Installation

# Get the packages you need
apt-get install build-essential gcc libcurl4-openssl-dev libxml2-dev
             libssl-dev libfuse-dev
apt-get install git
git clone https://github.com/redbo/cloudfuse.git
cd cloudfuse
./configure
make
sudo make install

Configuration

Create a file named ~/.cloudfuse (see the main doc to show how to make an automatic mountpoint). Lay the ~/.cloudfuse file out like so:

username=[Account username for authentication, required]
api_key=[API key for authentication with Rackspace]
authurl=https://auth.api.rackspacecloud.com/v1.0 # If LON, use https://lon.auth.api.rackspacecloud.com/v1.0
region=[Regional endpoint to use]
use_snet=[True to use Rackspace ServiceNet for connections]
cache_timeout=[Seconds for directory caching, default 600]

Usage

Now you can mount a directory (new or old) directly

$ mkdir /test
$ cloudfuse /test