Giter Club home page Giter Club logo

db3cdc's Introduction

DB3 CDC

The first data backup protocol based on db3 for mysql which has the following features

  • replicate mysql to db3 in realtime
  • recover from last synchronization progress stored in db3 after restarting db3cdc
  • recover mysql from db3

Warning: Using DB3 and DB3 CDC in production enviroment is not recomended

How it works

how_it_works

when starting db3cdc for the first time, it will sync data from the begining of mysql binlog and submit mutation including the binlog events and the progress of synchronization. if you restart db3cdc, it will sync data from the last position that has been submited to db3

Getting Started

  1. Download the release of db3 cdc from github according to your operation system, if you want run db3 cdc in linux
wget https://github.com/dbpunk-labs/db3cdc/releases/download/v0.2.0/db3cdc-v0.2.0-linux-x86_64.tar.gz
tar -zxf db3cdc-v0.2.0-linux-x86_64.tar.gz
cd ./db3cdc-v0.2.0-linux-x86_64/
./bin/db3cdc --help
Usage: db3cdc <COMMAND>

Commands:
  sync     Start a interactive shell
  version  Get the version of DB3 CDC
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help information
  1. use db3cdc to replicate mysql to db3
./bin/db3cdc sync --db3-node-grpc-url https://grpc.devnet.db3.network\
 --password mysql_password \
 --user mysql_root_user \
 --master-host mysql_host \
 --master-port mysql_port

the devnet is unstable, you can change the grpc url to the following nodes in our testnet

  1. You will see some information
2022-11-21T04:47:29.038953Z  INFO db3cdc: no gtid state in db3
WARNING, db3 will generate private key and save it to /home/jackwang/.db3/user.key
restore the key with addr 0x97b478ac2bef8762c2ecc08417f35838c4bf73fc
2022-11-21T04:47:29.040835Z  INFO db3cdc: binlog options BinlogOptions { filename: "", position: 4, gtid_set: None, gtid_list: None, starting_strategy: FromStart }
2022-11-21T04:47:29.349037Z  INFO db3cdc: mutation id "tWYRruF8dSwvOySMypYCD0pJTVZgquKZu116UddTAps="
2022-11-21T04:47:29.429778Z  INFO db3cdc: Your account 0x97b478ac2bef8762c2ecc08417f35838c4bf73fc status: total bills 0.000000 db3, total storage used 0.00 , total mutation 0, credits 10 db3

these information includes

  • your key path
  • last synchronization progress
  • your account bills status and credit

db3cdc's People

Contributors

imotai avatar

Stargazers

 avatar xutweety avatar Chen Chenglong avatar

Watchers

 avatar  avatar

db3cdc's Issues

question about the sync relationship of my local and DB3 network

./bin/db3cdc sync --db3-node-grpc-url https://grpc.devnet.db3.network\
--password mysql_password
--user mysql_root_user
--master-host mysql_host
--master-port mysql_port

MySQL database is local and I intended to sync it to DB3,
--password
is my local DB password or the corresponding password in DB3?
--user
is my local DB user name or the corresponding user name in DB3?
--master-host
is my local DB hostname 127.0.0.1 or the backup_master?
--master-port
is my local DB port 3306, or is there a backup port for me in your testnet node?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.