Minio数据迁移

Minio数据迁移

下载mc工具

1
wget https://dl.min.io/client/mc/release/linux-amd64/mc -P /usr/local/bin/

添加minio服务端

1
2
mc config host add minio_243 http://192.168.1.243:9000 user password
mc config host add minio_245 http://192.168.1.245:9000 user password

image-20231018172017673

**出现Added **minio_243 successfully.即为成功添加

参数解释:

**minio_243为别名,随意定义区分作用 **

user 为用户

password 为密码

查看minio服务端配置

1
mc config host ls

image-20231018172237127

minio之间数据迁移(同步)

1
2
3
4
5
6
7
8
9
10
11
#全量迁移,重名文件不覆盖,bucket不存在会自动创建
mc mirror minio_243 minio_245


#只是迁移某个bucket,以test为例,目标的bucket需要提前建好
mc mirror minio_243/test minio_245/test


#覆盖重名文件,加--overwrite
mc mirror --overwrite minio_243/test minio_245/test

删除节点

1
mc alias remove minio_245