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

作者阿里云代理 文章分类 分类:linux图文教程 阅读次数 已被围观 942

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

imageimage

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

image

开始上传下载文件

上传

./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

image

阐明 cp是复制  后边两个参数是从哪里复制到哪里,也便是oss和ecs本地途径,qianyidata是容器姓名。

本公司销售:阿里云新/老客户,只要购买阿里云,即可享受折上折优惠!>

我有话说: