Coder Social home page Coder Social logo

chudry / ptubes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meituan/ptubes

0.0 0.0 0.0 632 KB

Ptubes is a database disaster recovery product based on the PITR (Point In Time Recovery) method, which can be used to restore the entire database to a specific point in time to help users improve the reliability and security of the database

License: Other

Shell 0.25% Java 99.75%

ptubes's Introduction

Introduction

License


EN doc CN doc


Ptubes is a database disaster recovery product based on PITR (Point In Time Recovery), which can be used to restore the entire database to a specific point in time to help users improve the reliability and security of the database. The product consists of three core components, Reader, Storage and SDK. It provides functions such as safe backup and efficient distribution of database change events. Typical scenarios are as follows:

  • data backup
  • Data playback
  • Data Recovery
  • Event driven
  • The database is more active

Quick Start

Prerequisite

  • 64bit JDK 1.8+

  • Maven 3.2.x

Run Reader

1.mysql preparation
Ptubes synchronization data requires mysql to support Binlog ROW mode in advance, users need to modify the binlog mode in advance

[mysqld]

log-bin=mysql-bin # Open binlog

binlog-format=ROW # Modify to ROW mode

2.Start Reader
2.1.Download the compressed package
ptubes-reader-server.tar.gz

2.2.Unzip to any directory

mkdir /user/ptubes
tar zxvf ptubes-reader-server.tar.gz -C /tmp/ptubes

After decompression, you can see the directory structure

drwxr-xr-x   4 yangmouren  staff   128  2 17 16:47 bin
drwxr-xr-x   5 yangmouren  staff   160  2 17 16:54 conf
drwxr-xr-x  63 yangmouren  staff  2016  2 17 17:00 lib

2.3.Modify related configuration information In the conf directory, modify a reader.conf and fill in the configuration

ptubes.server.tasks=demoR1,demoR2 //Task name, each task needs to have configuration information of the corresponding file, separated by commas

The program will continue to read the ReaderTask related configuration according to the parameters of ptubes.server.tasks. Take the above picture as an example, the program will automatically search for demoR1.properties and demoR2.properties from the current directory, and we will create corresponding files respectively (as shown in the following figure)

ptubes.reader.mysql.host= //mysql host address
ptubes.reader.mysql.port= //mysql port
ptubes.reader.mysql.user= //mysql username
ptubes.reader.mysql.passwd= //mysql password

Then run the program to start the ptubes exploration journey.

2.4.Start the service

sh bin/start.sh

2.5.View service log

tail -f logs/reader.log

2.6.Shut down the service

sh bin/stop.sh

Start the SDK

SDK start

more configuration

configuration document

Documentation

License

Apache License, Version 2.0 Copyright (C) Apache Software Foundation

issues

Ptubes ISSUES

ptubes's People

Contributors

myksl avatar zsongshu avatar lvfeifei08 avatar lvfei03 avatar meituan-tech avatar

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.