Rclone的简单使用

部署

 curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
 unzip rclone-current-linux-amd64.zip
 cd rclone-v1.63.1-linux-amd64/
 mv rclone /usr/local/bin/
 ln -s /usr/local/bin/rclone /usr/bin/
 rclone version

配置

# 查看支持的配置
rclone provider
cd ~/.config/rclone/
vim rclone.conf

# 写入
[oss]
type = s3
provider = Alibaba
access_key_id = accessaccessaccess
secret_access_key = secretsecretsecret
endpoint = https://oss-cn-beijing-internal.aliyuncs.com
acl = public-read
storage_class = STANDARD
bucket_acl = public-read

文件同步

rclone config
rclone sync /home/www/ oss:test_bucket --progress
rclone ls oss:test_bucket