美文网首页
阿里云oss云存储——ossutil工具

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

作者: 宇辰星君 | 来源:发表于2019-01-08 09:45 被阅读23次

OSS

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

OSS常用工具汇总

  1. ossbrowser
    图形化的Object管理工具。
  • 图形化界面,使用简单。
  • 提供类似Windows资源管理器的功能。
  • 支持直接浏览文件。
  • 支持文件目录(文件夹)的上传下载。
  • 支持文件并发上传、断点续传。
  • 支持RAM子账号的图形化Policy授权操作。
  • 支持Windows、Linux、Mac平台。
    使用限制:ossbrowser是图形化工具,传输速度和性能不如ossutil。
  1. ossutil
    Object和Bucket的命令行管理工具。
  • 提供方便、简洁、丰富的Object和Bucket管理命令,操作性能好。
  • 支持文件并发上传、断点续传。
  • 支持文件目录(文件夹)的上传下载。
  • 支持Bucket常见管理命令。

ossutil使用

几个常用命令:

  • ossutil config #配置相关信息
  • ossutil ls oss://test #查看目录内容
  • ossutil cp a b #从a到b拷贝(a/b可能是本地或OSS数据)
$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

相关文章

网友评论

      本文标题:阿里云oss云存储——ossutil工具

      本文链接:https://www.haomeiwen.com/subject/ipwyrqtx.html