tidb-binlog

module
v0.0.0-...-6fba4f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0

README

TiDB-Binlog

Build Status Coverage Status Go Report Card

TiDB-Binlog introduction

TiDB-Binlog is a tool used to collect TiDB's binary logs with the following features:

  • Data replication

    Synchronize data from the TiDB cluster to heterogeneous databases.

  • Real-time backup and recovery

    Backup the TiDB cluster into the Dump file and it can be used for recovery.

  • Multiple output format

    Support MySQL, Dump file, etc.

  • History replay

    Replay from any history point.

Documentation

Architecture

architecture

Service list

Pump

Pump is a daemon that receives real-time binlogs from tidb-server and writes in sequential disk files synchronously.

Drainer

Drainer collects binlogs from each Pump in the cluster, transforms binlogs to various dialects of SQL, and applies to the downstream database or filesystem.

How to build

To check the code style and build binaries, you can simply run:

make build   # build all components

If you only want to build binaries, you can run:

make pump  # build pump

make drainer  # build drainer

When TiDB-Binlog is built successfully, you can find the binary in the bin directory.

Run Test

Run all tests, including unit test and integration test

make test

See tests for how to execute and add integration tests.

Deployment

The recommended startup sequence: PD -> TiKV -> Pump -> TiDB -> Drainer

The best way to install TiDB-Binlog is via TiDB-Binlog-Ansible

Tutorial

Here's a tutorial to experiment with TiDB-Binlog (not for production use).

Config File

Contributing

Contributions are welcomed and greatly appreciated. See CONTRIBUTING.md for details on submitting patches and the contribution workflow.

License

TiDB-Binlog is under the Apache 2.0 license. See the LICENSE file for details.

Directories

Path Synopsis
cmd
pkg
dml
sql
zk
proto
binlog
Package pb_binlog is a generated protocol buffer package.
Package pb_binlog is a generated protocol buffer package.
tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL