使用rclone同步两个不同云服务商对象存储的数据
- 2025-08-08 18:27:10
- 丁国栋
- 原创 2
一些团队有多云的使用场景,有时会把服务从云服务商A迁移到云服务商B,或者数据在两个不同的云服务商之间进行同步。
已知问题:
- 并非所有的S3兼容的云厂商的对象存储都对 rclone 友好,对于这种对象存储服务,建议使用云厂商自己家的工具,比如 qsctl。
1. 设置配置
<略>
2. 列出文件
rclone ls <rclone-config-name1>:<bucket-name>/subpath/ rclone ls <rclone-config-name2>:<bucket-name>/subpath/
3. 同步数据
rclone copy -P <rclone-config-name1>:<bucket-name>/subpath/ <rclone-config-name2>:<bucket-name>/subpath/ --exclude="*/*.pdf" --exclude="*.other" --dry-run
青云对象存储从云上同步到本地
qsctl sync -r qs://<bucket-name>/subpath/ /tmp/subpath/ --exclude-regexp ".*.pdf|.*.other"腾讯云对象存储从本地同步到云上
coscli sync -r /tmp/<subpath>/ cos://<bucket-name>/<subpath>/--
发表评论