Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: propose a decentralized live backup tool for mysql #147

Closed
2 tasks done
imotai opened this issue Nov 13, 2022 · 0 comments · Fixed by dbpunk-labs/db3cdc#2
Closed
2 tasks done

WIP: propose a decentralized live backup tool for mysql #147

imotai opened this issue Nov 13, 2022 · 0 comments · Fixed by dbpunk-labs/db3cdc#2
Assignees
Labels
Milestone

Comments

@imotai
Copy link
Contributor

imotai commented Nov 13, 2022

The Problems

Web3 native applications need a decentralized data architecture, but it's not easy to build a fully decentralized data architecture, for web3 startups MySQL is still the first option, but MySQL is a centralized data architecture and then they have to take a lot of time to develop tools to synchronize partial data of MySQL to arweave

db3_cdc-arch

Why DB3 CDC

db3_cdc can help web3 developers to setup synchronizing all data of MySQL to DB3 out of box

  • no extra tools to be developed
  • all data of MySQL will be synchronized to db3 in realtime

db3_cdc

Who can use DB3 CDC

  1. web3 applications which have used MySQL as the backend database already

if you are looking for a fully decentralized data architecture, you can use db3 directly

How to use DB3 CDC

  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

The plans

Reference

@imotai imotai changed the title add db3_backup to backup mysql WIP: propose a decentralized live backup tool for mysql Nov 16, 2022
@imotai imotai added the dip label Nov 16, 2022
@imotai imotai added this to the M2 milestone Nov 16, 2022
@imotai imotai self-assigned this Nov 16, 2022
@imotai imotai linked a pull request Nov 18, 2022 that will close this issue
@imotai imotai reopened this Nov 19, 2022
@imotai imotai closed this as completed Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant