阿里云oss云存储——ossutil工具

2019-01-08  本文已影响23人  宇辰星君

OSS

阿里云对象存储服务(Object Storage Service,简称 OSS),是阿里云提供的海量、安全、低成本、高可靠的云存储服务。您可以通过调用 API,在任何应用、任何时间、任何地点上传和下载数据,也可以通过 Web 控制台对数据进行简单的管理。OSS 适合存放任意类型的文件,适合各种网站、开发企业及开发者使用。按实际容量付费真正使您专注于核心业务。

OSS常用工具汇总

  1. ossbrowser
    图形化的Object管理工具。
  1. ossutil
    Object和Bucket的命令行管理工具。

ossutil使用

几个常用命令:

$ossutil config  #配置信息
The command creates a configuration file and stores credentials.

Please enter the config file path(default /home/suyanan/.ossutilconfig, carriage return will use the default path. If you specified this option to other path, you should specify --config-file option to the path when you use other commands):/export/project/1.ONT/project1/WGS/.ossutilconfig_customer-test
For the following settings, carriage return means skip the configuration. Please try "help config" to see the meaning of the settings.

Please enter language(CH/EN, default is:EN, the configuration will go into effect after the command successfully executed):CH
Please enter accessKeyID:AAAAAAAAAAAA
Please enter accessKeySecret:DBASDBASBSABDSBSABSBAASB
Please enter stsToken:
Please enter endpoint:oss.aliyuncs.com

#执行拷贝
ossutil cp oss://novo-data-nj/customer-test/ . -r -f --jobs 3 --parallel 2 --config-file /export/project/1.ONT/project1/WGS/.ossutilconfig_customer-test
#run_ossutil.sh
AccessKeyId=${1}
AccessKeySecret=${2}
cloud_url=${3}  #预设OSS路径
outdir=${4}  #本地存放路径

endpoint=oss-cn-hangzhou.aliyuncs.com  #oss.aliyuncs.com  #oss-cn-beijing.aliyuncs.com

ossutil cp ${cloud_url} ${outdir} -r -f --jobs 3 --parallel 2 -e ${endpoint} -i ${AccessKeyId} -k ${AccessKeySecret}

end

上一篇 下一篇

猜你喜欢

热点阅读