官方文档建议:
从8.3.0开始binlog作为一个过时的产品将被完全移除,增量备份建议使用ticdc,这里针对已经部署了pump和drainers的集群做出移除操作
查看状态:
show variables like "log_bin"; show pump status; show drainer status;
总结:
1.先将pump的节点缩容到1
2.配置tidb的binlogEnabled: false
3.删除pump
配置项
4.删除 Pump StatefulSet 资源
5.移除pump的pvc资源
6. 进入到drainer的pod中
kubectl -n tidb exec -it tidb-cluster-drainer-0 bash ##如果有多个drainer需要执行多次tidb-cluster-drainer-0:8249 /binlogctl -pd-urls=http://tidb-cluster-pd:2379 -cmd offline-drainer -node-id tidb-cluster-drainer-0:8249
7.删除 Drainer StatefulSet 资源
第6步如果失败
kubectl run update-drainer-${ordinal_id} --image=pingcap/tidb-binlog:${tidb_version} --namespace=${namespace} --restart=OnFailure -- /binlogctl -pd-urls=http://${cluster_name}-pd:2379 -cmd update-drainer -node-id ${drainer_node_id}:8249 --state offline