一个非常简单的rackspace云文件上传程序
cfupload的Python项目详细描述
#Simple Cloud Files Uploader
用于快速将文件上载到[Rackspace Cloud Files]或[OpenStack Swift]的Python脚本(http://www.rackspace.com/cloud/files/)(http://swift.openstack.org)。最初是为了使一行上传更容易管理而开发的。支持通过文件参数或标准输入进行输入。
【virtuallenv】(http://www.virtuallenv.org/en/latest/index.html/http://www.virtuallenv.org/en/latest/index.html)使用以下方法中的任何一种,你可以选择:
35 35\<
`` bash
$pip install cfupload
`````` bash
` `` bash install cfupload
` ` `
` ` ` ` `
` ` ` ` ` ` ` ` ` ` ` ` 35;setuptools
``` bash
$git clonegit://github.com/davidwittman/simple cloud files uploader.git
$cd simple cloud files uploader
$python setup.py install
`````
][-q][-c]
容器[文件[文件…]
此帮助消息和退出
BR/>云文件连接信息:
-K & lt;API key & gt;- Apkey & lt;API密钥& gt;
API密钥。默认为env[cloud_files_apikey]
-u<;username>;,--user<;username>;
username。默认为env[云文件用户名]
-a<;验证URL>;,--auth<;验证URL>;
验证终结点。默认为
env[cloud_file s_auth_url]
-s,--snet使用servicenet进行连接
output选项:
-o<;filename>;,--file<;filename>;
cloud files中的目标文件名或openstack swift
-q静音输出
-c,--cdn将cdn url打印到stdout
``
或者,可以将用户名、auth_url和api密钥作为选项传入,选项有“-u”、“a”和“-k”,respectively.
### Upload a single file
``` bash
$ cfupload mycontainer ~/F4z2L.gif
```
### Upload multiple files
``` bash
$ cfupload gifs ~/Pictures/*.gif
```
### Upload from stdin
``` bash
$ tar cvzf - ~/important/* | cfupload -o backup-$(date '+%Y%m$d') 备份
```
\pro tips
*导出环境变量“cloud”文件{apikey,用户名,auth_url}`在bash配置文件中,以防止每次运行cfupload时都需要指定这些选项
*从标准输入上载时,目标文件名必须与-o一起提供
*从标准输入管道您的文件以使cronjob备份变得简单:
``mysqldump--all databases“+%y%m%d”).sql.gz容器`
用于快速将文件上载到[Rackspace Cloud Files]或[OpenStack Swift]的Python脚本(http://www.rackspace.com/cloud/files/)(http://swift.openstack.org)。最初是为了使一行上传更容易管理而开发的。支持通过文件参数或标准输入进行输入。
【virtuallenv】(http://www.virtuallenv.org/en/latest/index.html/http://www.virtuallenv.org/en/latest/index.html)使用以下方法中的任何一种,你可以选择:
35 35\<
`` bash
$pip install cfupload
`````` bash
` `` bash install cfupload
` ` `
` ` ` ` `
` ` ` ` ` ` ` ` ` ` ` ` 35;setuptools
``` bash
$git clonegit://github.com/davidwittman/simple cloud files uploader.git
$cd simple cloud files uploader
$python setup.py install
`````
][-q][-c]
容器[文件[文件…]
此帮助消息和退出
BR/>云文件连接信息:
-K & lt;API key & gt;- Apkey & lt;API密钥& gt;
API密钥。默认为env[cloud_files_apikey]
-u<;username>;,--user<;username>;
username。默认为env[云文件用户名]
-a<;验证URL>;,--auth<;验证URL>;
验证终结点。默认为
env[cloud_file s_auth_url]
-s,--snet使用servicenet进行连接
output选项:
-o<;filename>;,--file<;filename>;
cloud files中的目标文件名或openstack swift
-q静音输出
-c,--cdn将cdn url打印到stdout
``
或者,可以将用户名、auth_url和api密钥作为选项传入,选项有“-u”、“a”和“-k”,respectively.
### Upload a single file
``` bash
$ cfupload mycontainer ~/F4z2L.gif
```
### Upload multiple files
``` bash
$ cfupload gifs ~/Pictures/*.gif
```
### Upload from stdin
``` bash
$ tar cvzf - ~/important/* | cfupload -o backup-$(date '+%Y%m$d') 备份
```
\pro tips
*导出环境变量“cloud”文件{apikey,用户名,auth_url}`在bash配置文件中,以防止每次运行cfupload时都需要指定这些选项
*从标准输入上载时,目标文件名必须与-o一起提供
*从标准输入管道您的文件以使cronjob备份变得简单:
``mysqldump--all databases“+%y%m%d”).sql.gz容器`