6
批量下载七牛对象存储文件
source link: https://sobird.me/batch-download-qiniu-files.htm
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
批量下载七牛对象存储文件
早在2016年把博客上的图片及文件传到七牛的CDN空间,然后直接使用七牛融合 CDN 测试域名一直到现在,很早之前就发现这个测试域名已经无法使用了,博客里的图片几乎也都无法显示,我的内心是崩溃的,绑定自己的域名则需要ICP备案,而备案这种事自己也真的懒的搞,虽然七牛提示测试域名只能使用30天,实际上在2016年那会我差不多一直使用七牛提供的测试域名到2017年,但具体是那天无法使用自己也不清楚了。
好吧,不管怎样,今天决定不再使用七牛提供的免费的CDN服务,打算将图片文件迁移到我自己的VPS上。
迁移旧的bucket到新建的bucket
下载qshell
上面的地址包含了qshell的下载地址,以及使用方法,本文记录在mac下的操作。
解压下载的qshell-v2.3.4.zip
cd qshell-v2.3.4
./qshell_darwin_x64 account -h
./qshell_darwin_x64 account ak sk qiniu
./qshell_darwin_x64 listbucket wordpress > wordpress.bucket.txt
awk '{print $1}' wordpress.bucket.txt > wordpress.bucket.list.txt
./qshell_darwin_x64 batchcopy wordpress wordpress2 -i wordpress.bucket.list.txt
批量下载到本地
vi LocalDownloadConfig.conf
加入下面配置
{
"dest_dir": "/Users/sobird/Downloads/qiniu",
"bucket": "wordpress2",
"prefix" : "",
"suffixes" : "",
"cdn_domain": "http://pjm8015fw.bkt.clouddn.com",
"referer": "",
"log_file": "download.log",
"log_level": "info",
"log_rotate": 1,
"log_stdout": false
}
执行下面命令下载
./qshell_darwin_x64 qdownload LocalDownloadConfig.conf
编辑于 2018年12月12日
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK