阿里云oss云存储ossutil工具

2021-11-23

ossfs挂载当磁盘rsync时候非常卡,替换ossutil工具

1、安装ossfs
yum -y install fuse
wget -c https://gosspublic.alicdn.com/ossfs/ossfs_1.80.6_centos8.0_x86_64.rpm
yum -y localinstall ossfs_1.80.6_centos8.0_x86_64.rpm
mkdir /ossfs
echo test-oss:abc:dfdsfsdf > /etc/passwd-ossfs
chmod 640 /etc/passwd-ossfs
###
ossfs test-oss /ossfs -o url=https://oss-cn-qingdao-internal.aliyuncs.com

2、rsync 同步一个目录到ossfs
rsync -avz ${src_dir} ${oss_dir}

3、安装ossutil
wget -c http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/35477/cn_zh/1469154754252/ossutil?spm=5176.doc35477.2.2.10s
TBb -O /usr/bin/ossutil
chmod 755 /usr/bin/ossutil
cat ~/.ossutilconfig
[Credentials]
language=中文
endpoint=oss-cn-qingdao-internal.aliyuncs.com
accessKeyID=abc
accessKeySecret=efsdfasdfasdf
[Bucket-Endpoint]
el-views-oss=oss-cn-qingdao-internal.aliyuncs.com

4、ossutil同步一个目录到oss
ossutil -c ~/.ossutilconfig cp -rf ${src_dir} ${util_dir}
oss_dir=/ossfs/test/${item}/
util_dir=oss://test/${item}/

5、ossutil ls oss:/test/${item}

分类:数据库 | 标签: |

相关日志

评论被关闭!