阿里云ecs服务器之间大文件迁移利用阿里云oss通过内网传输解决方案

  • 内容
  • 评论
  • 相关

官方工具下载地址:https://help.aliyun.com/document_detail/44075.html

1.如果是windows的服务器直接下载阿里云官方图形界面工具ossbrowser,上传到oss,然后在从另外一台服务器下载oss里面大文件到服务器磁盘,需要注意通过内网上传下载,如果通过外网需要额外支付流量费用。

1.png2.png

2.如果是linux服务器需要使用ossutil,文章以centos7详细举例说明

ossutil下载和安装

[root@iZ2zeab8t820b6yl5wbxk6Z ~]# wget http://gosspublic.alicdn.com/ossutil/1.6.9/ossutil64

[root@iZ2zeab8t820b6yl5wbxk6Z ~]# chmod 755 ossutil64

使用交互式配置生成配置文件

[root@iZ2zeab8t820b6yl5wbxk6Z ~]# ./ossutil64 config
The command creates a configuration file and stores credentials.

Please enter the config file name,the file name can include path(default /root/.ossutilconfig, carriage return will use the default file. If you specified this option to other file, you should specify --config-file option to the file when you use other commands):
No config file entered, will use the default config file /root/.ossutilconfig

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):EN
Please enter endpoint: http://oss-cn-beijing-internal.aliyuncs.com

Please enter accessKeyID:LTAIVZGND2ErRTa7

Please enter accessKeySecret:yxgVMMDjodpJko2MR64AuCkkslbkok
Please enter stsToken:
[root@iZ2zeab8t820b6yl5wbxk6Z ~]# cat  /root/.ossutilconfig
[Credentials]
language=EN
endpoint= http://oss-cn-beijing-internal.aliyuncs.com
accessKeyID=LTAIVZGND2ErRTa7
accessKeySecret=yxgVMMDjodpJko2MR64AuCkkslbkok


解释说明:

endpoint: http://oss-cn-beijing-internal.aliyuncs.com   必须要有http://,如果这个不填写默认是外网访问,而不是ECS 的经典网络访问(内网),将会花费流量费用。此外你的地址不一定是这个这是北京地域节点,看你的ecs和oss所在地域。

stsToken不用填写

language默认cn

accessKeyID:查看方式请参考创建AccessKey。
accessKeySecret:查看方式请参考创建AccessKey。
第一步的配置文件路径,不填写,默认就行

至此ossutil下载安装配置完毕。

阿里云后台创建容器,读写权限公共读写,容器名字 我这里是qianyidata

3.png

开始上传下载文件

上传

./ossutil64   cp   ./plat.quanmindian.com_20191127_093133.zip      oss://qianyidata/plat.quanmindian.com_20191127_093133.zip     

下载

./ossutil64  cp    oss://qianyidata/plat.quanmindian.com_20191127_093133.zip     ./plat.quanmindian.com_20191127_093133.zip

10.png

说明 cp是拷贝  后面两个参数是从哪里拷贝到哪里,也就是oss和ecs本地路径,qianyidata是容器名字。








本文标签:

版权声明:若无特殊注明,本文皆为《菜鸟站长》原创,转载请保留文章出处。

本文链接:阿里云ecs服务器之间大文件迁移利用阿里云oss通过内网传输解决方案 - https://www.wlphp.com/?post=221

发表评论

电子邮件地址不会被公开。 必填项已用*标注