当前位置:网站首页>New and old cluster migration of Minio data
New and old cluster migration of Minio data
2022-06-25 12:23:00 【lihongbao80】
mc Command provides a convenient management ~/.mc/config.json How to configure the host information in the file , You can also manually modify this configuration file with a text editor
1、 download
wget https://dl.min.io/client/mc/release/linux-amd64/mc -P /usr/local/bin/
chmod +x /usr/local/bin/mc
2、 add to minio Server configuration { The target service And The source service Need to be }
mc config host add ${
MINIO_NAME} http://${
HOST_IP}:${
Port} ${
UserName} ${
PASSWD}
# Refer to the following :
mc config host add minio_AZ http://192.168.181.28:9024 admin 11111111
mc config host add minio_UAT http://192.168.180.37:39000 admin [email protected]
3、 see minio Server configuration
mc config host ls
4、 minio Data synchronization between
mc mirror --overwrite ${
Source} ${
Dest}
# for example :
mc mirror --overwrite minio_AZ/az-flow minio_UAT/az-flow
5、 Other commands
MinIO Client (mc) by ls,cat,cp,mirror,diff,find etc. UNIX The command provides an alternative . It supports file systems and is compatible with Amazon S3 Cloud storage services for (AWS Signature v2 and v4).
Copyls List files and folders .
mb Create a bucket or folder .
cat Show file and object content .
pipe Will a STDIN Redirect to an object or file or STDOUT.
share Generate... For sharing URL.
cp Copy files and objects .
mirror Mirror buckets and folders .
find Find files based on parameters .
diff Compare the differences between two folders or buckets .
rm Delete files and objects .
events Management object notification .
watch Listen for file and Object Events .
policy Manage access policies .
session by cp Command management saved session .
config management mc The configuration file .
update Check for software updates .
version Output version information .
Get cluster information
# Execute the command to test whether it can be connected , If there is a file or at least one Bucket, Will be listed in the echo :
mc ls minio_UAT
# Execute the command to obtain the cluster data size , If there is a file or at least one exists Bucket, The total size of all files in the current cluster will be printed on the last line :
mc du minio_UAT
Torture ( Mirror image )
# Use the command to Bucket Torture ,mc It is impossible to copy the whole cluster , A single command can only be used one by one Bucket To operate :
mc mirror $SrcCluster/$srcBucket $DestCluster
# for example :
mc mirror clusterA/bucketa clusterB
mc mirror The command may not specify Dest Of Bucket, If $DestCluster There is no corresponding name Bucket, It will be created automatically during copying .
# To realize copying without stopping the machine , You can use the following command :
mc mirror -w $srcCluster/Bucket $destCluster
#-w Parameters can make mirror Command continuously monitors a directory . because mirror You can only copy the list Bucket, If you use Shell The script goes on for When polling the cluster for copying , once Bucket Too much , This command may cause a large number of monitoring threads , Increase the load .
Check whether it is completely finished
# Use the command to check if there are incomplete files transferred , If there are incomplete files , Will be listed in the echo :
mc ls --incomplete minio_UAT
# If necessary , You can delete incomplete files in a bucket :
mc rm --incomplete $hostName/$bucket
Some instructions
There is no need to worry about data fragmentation , Even if the number of nodes is not equal .
Because it accesses and obtains data directly from the cluster portal , Not at all ” disk to disk “ How to move , It doesn't matter whether a disk on a node stores erasure codes or fragmented data , Because the data read from the cluster address is complete , This is why it is necessary to obtain the cluster address .
Bucket stay MinIO Shall be deemed to be ” Mount Directory “ (mount), instead of “ Disk directory ” (mkdir).
mc cp The command needs to have the same name in the target cluster Bucket,mc mirror Unwanted , meanwhile mc mirror The hierarchy information of the directory will be saved automatically ,mc cp Need to specify additional --recursive Parameters , Please choose according to your needs .
mc mirror The cluster of to colony 、 colony to Local usage is not in Official documents Listed in , Probably belong to hack usage , Please pay attention to the possible risks .
边栏推荐
- 【数据中台】数据中台的OneID是个什么鬼,主数据它不香吗?
- Web project development process
- Does sklearex make your sklearn machine learning model training fly fast?
- 属性分解 GAN 复现 实现可控人物图像合成
- 一套自动化无纸办公系统(OA+审批流)源码:带数据字典
- How to open an account for trading futures Shanghai nickel products online
- 动态代理
- If you also want to be we media, you might as well listen to Da Zhou's advice
- Dynamic proxy
- What is Flink? What can Flink do?
猜你喜欢

20. MVVM command binding of WPF

Explanation of ideas and sharing of pre-processing procedures for 2021 US game D (with pre-processing data code)

How to use SPSS to do grey correlation analysis? Quick grasp of hand-to-hand Teaching
![[oceanbase] Introduction to oceanbase and its comparison with MySQL](/img/1c/bd2bcddb7af4647407d2bc351f5f5d.png)
[oceanbase] Introduction to oceanbase and its comparison with MySQL

【数据中台】数据中台的OneID是个什么鬼,主数据它不香吗?

Understanding and construction of devsecops and Devops

架构师为你揭秘在阿里、腾讯、美团工作的区别

What is Flink? What can Flink do?

Rank sum ratio comprehensive evaluation method for common models in mathematical modeling

The cloud native data lake has passed the evaluation and certification of the ICT Institute with its storage, computing, data management and other capabilities
随机推荐
揭秘GaussDB(for Redis):全面對比Codis
VFP serial port communication is difficult for 9527. Maomao just showed his skill and was defeated by kiss
Is the online stock trading account opening ID card information safe?
PyCaret 成功解决无法从‘sklearn.model_selection._search‘导入名称“_check_param_grid”
R语言caTools包进行数据划分、scale函数进行数据缩放、e1071包的naiveBayes函数构建朴素贝叶斯模型
Old ou, a fox friend, has had a headache all day. The VFP format is always wrong when it is converted to JSON format. It is actually caused by disordered code
Pd1.4 to hdmi2.0 adapter cable disassembly.
Flutter common commands and problems
动态代理
一个硬件工程师走过的弯路
The R language cartools package divides data, the scale function scales data, and the NaiveBayes function of e1071 package constructs a naive Bayesian model
RecyclerView滚动到指定位置
Learning notes 2022 overview | automatic graph machine learning, describing AGML methods, libraries and directions
Découvrir gaussdb (pour redis): une comparaison complète avec Codis
19. Implementation of MVVM architecture based on WPF event to command
Architects reveal the difference between working in Alibaba, Tencent and meituan
SDN system method | 9 Access network
confluence7.4. X upgrade record
刷入Magisk通用方法
2022年首期Techo Day腾讯技术开放日将于6月28日线上举办