4

使用rclone同步你的数据

 1 year ago
source link: https://www.bboy.app/2022/12/20/%E4%BD%BF%E7%94%A8rclone%E5%90%8C%E6%AD%A5%E4%BD%A0%E7%9A%84%E6%95%B0%E6%8D%AE/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

使用rclone同步你的数据

2022-12-20 11:17:00 linux

20221220-1.webp

我有一部分的文件备份完成之后是直接上传到minio上的,minio目前最新的版本是不支持gateway模式的,所以需要下载过来才会有源文件,所以之前使用rsync去同步备份minio中的文件是不行了。

首先安装rclone

apt install rclone -y

生成配置文件

这个你可以直接编辑/root/.config/rclone/rclone.conf

也可以使用rclone config命令去生成

下面是我的配置

[minio]
type = s3
provider = Minio
env_auth = false
access_key_id = id
secret_access_key = pass
endpoint = https://minio.xxxxxxx.cn

[sftp]
type = sftp
host = 10.10.100.244
user = id
pass = passs

之后使用下面的命令sync

rclone sync --no-check-certificate=true minio:gitea-backup sftp:/data/backup/baidu-upload/gitea-backup

--no-check-certificate 表示不检查证书,防止minio的证书过期导致不能同步

欢迎关注我的博客 www.bboy.app

Have Fun



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK