简体   繁体   English

如何将CDN文件夹同步到本地文件夹?

[英]How to synchronize a CDN folder to a local folder?

Is there a way to synchronize a CDN container (cloudfiles to be more specific) to a local folder? 有没有一种方法可以将CDN容器(更具体的说是cloudfiles)同步到本地文件夹? Or is there a way to bulk a download a CDN container? 还是有一种批量下载CDN容器的方法?

Though it doesn't seem to be actively maintained, there is CloudFuse . 尽管似乎没有对其进行积极维护,但这里有CloudFuse It's written in C and has to be compiled on your box (no packages available. 它是用C编写的,必须在您的机器上进行编译(没有可用的软件包。

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). 创建一个名为~/.cloudfuse的文件(请参阅主要文档以显示如何创建自动挂载点)。 Lay the ~/.cloudfuse file out like so: 像这样放置~/.cloudfuse文件:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM