上一篇使用了mc 执行迁移数据,本文使用另外一种迁移方法 rclone
1、下载reclone 官网地址Rclone
1.1 脚本安装
sudo -v ; curl https://rclone.org/install.sh | sudo bash
1.2 下载二进制文件
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64
#Copy binary file 复制二进制文件
sudo cp rclone /usr/bin/
sudo chown root:root /usr/bin/rclone
sudo chmod 755 /usr/bin/rclone
2、添加配置文件,执行命令rclone config file
3、修改配置文件,以下示例的源minio为单节点(192.168.15.10
),目标minio为新服务器
cat > /root/.config/rclone/rclone.conf <<EOF
[oldminio]
type = s3
provider = Minio
env_auth = false
access_key_id = {minio账号}
secret_access_key = {minio密码}
region = cn-east-1
endpoint = http://192.168.3.111:9000
location_constraint =
server_side_encryption =
[newminio]
type = s3
provider = Minio
env_auth = false
access_key_id = {minio账号}
secret_access_key = {minio密码}
region = cn-east-1
endpoint = http://10.30.3.231:9000
location_constraint =
server_side_encryption =
EOF
执行完后 执行命令查看配置 rclone config show
4、执行迁移(添加 -P 查看进度)。记得修改 bucketname
(注:目标minio不用提前创建该bucket)
rclone sync -P oldminio:{bucketname} newminio:{bucketname}
评论区