{"id":28507448,"url":"https://github.com/meituan/ptubes","last_synced_at":"2025-07-05T06:31:04.668Z","repository":{"id":39597160,"uuid":"479230939","full_name":"meituan/ptubes","owner":"meituan","description":"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","archived":false,"fork":false,"pushed_at":"2022-07-13T13:19:59.000Z","size":640,"stargazers_count":55,"open_issues_count":8,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-08T20:37:03.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meituan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-08T03:28:53.000Z","updated_at":"2025-04-18T00:48:33.000Z","dependencies_parsed_at":"2022-07-14T22:30:43.076Z","dependency_job_id":null,"html_url":"https://github.com/meituan/ptubes","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/meituan/ptubes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meituan%2Fptubes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meituan%2Fptubes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meituan%2Fptubes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meituan%2Fptubes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meituan","download_url":"https://codeload.github.com/meituan/ptubes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meituan%2Fptubes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263696090,"owners_count":23497489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-08T20:31:20.387Z","updated_at":"2025-07-05T06:31:04.663Z","avatar_url":"https://github.com/meituan.png","language":"Java","funding_links":[],"categories":["数据库中间件"],"sub_categories":[],"readme":"\n## Introduction\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n\n___\n[![EN doc](https://img.shields.io/badge/document-English-blue.svg)](README.md)\n[![CN doc](https://img.shields.io/badge/文档-中文版-blue.svg)](README_CN.md)\n\n___\n\nPtubes 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:\n* data backup\n* Data playback\n* Data Recovery\n* Event driven\n* The database is more active\n\n## Quick Start\n\n### Prerequisite\n\n* 64bit JDK 1.8+\n\n* Maven 3.2.x\n\n### Run Reader\n\n**1.mysql preparation**\u003cbr\u003e\nPtubes synchronization data requires mysql to support Binlog ROW mode in advance, users need to modify the binlog mode in advance\n```\n[mysqld]\n\nlog-bin=mysql-bin # Open binlog\n\nbinlog-format=ROW # Modify to ROW mode\n```\n**2.Start Reader**\u003cbr\u003e\n2.1.Download the compressed package\u003cbr\u003e\n[ptubes-reader-server.tar.gz](https://github.com/meituan/ptubes/releases/latest)\u003cbr\u003e\n\n2.2.Unzip to any directory\n```\nmkdir /user/ptubes\ntar zxvf ptubes-reader-server.tar.gz -C /tmp/ptubes\n```\nAfter decompression, you can see the directory structure\n```\ndrwxr-xr-x   4 yangmouren  staff   128  2 17 16:47 bin\ndrwxr-xr-x   5 yangmouren  staff   160  2 17 16:54 conf\ndrwxr-xr-x  63 yangmouren  staff  2016  2 17 17:00 lib\n```\n\n2.3.Modify related configuration information\nIn the conf directory, modify a reader.conf and fill in the configuration\n```ReaderServer.conf\nptubes.server.tasks=demoR1,demoR2 //Task name, each task needs to have configuration information of the corresponding file, separated by commas\n```\nThe 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)\n```demoRx.properties\nptubes.reader.mysql.host= //mysql host address\nptubes.reader.mysql.port= //mysql port\nptubes.reader.mysql.user= //mysql username\nptubes.reader.mysql.passwd= //mysql password\n```\nThen run the program to start the ptubes exploration journey.\n\n2.4.Start the service\n```\nsh bin/start.sh\n```\n2.5.View service log\n```\ntail -f logs/reader.log\n```\n2.6.Shut down the service\n```\nsh bin/stop.sh\n```\n### Start the SDK\n[SDK start](https://github.com/meituan/ptubes/wiki/%E5%AE%A2%E6%88%B7%E7%AB%AF%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)\n### more configuration\n[configuration document](https://github.com/meituan/ptubes/wiki/%E9%85%8D%E7%BD%AE%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)\n\n## Documentation\n- 1.[Home](https://github.com/meituan/ptubes/wiki)\n- 2.[Architecture-design](https://github.com/meituan/ptubes/wiki/Architecture-design)\n  - 2.1.[Overall Architecture and Deployment](https://github.com/meituan/ptubes/wiki/Architecture-design#1-overall-architecture-and-deployment)\n  - 2.2.[Module description](https://github.com/meituan/ptubes/wiki/Architecture-design#2-module-description)\n  - 2.3.[implementation details](https://github.com/meituan/ptubes/wiki/Architecture-design#3-implementation-details)\n- 3.[QuickStart](https://github.com/meituan/ptubes/wiki/QuickStart)\n  - 3.1.[mysql-preparation](https://github.com/meituan/ptubes/wiki/QuickStart#2mysql-preparation)\n  - 3.2.[Start Reader](https://github.com/meituan/ptubes/wiki/QuickStart#3-start-reader)\n- 4.[Client User Guide](https://github.com/meituan/ptubes/wiki/Client-User-Guide)\n  - 4.1.[Start mode one](https://github.com/meituan/ptubes/wiki/Client-User-Guide#2-start-mode-one)\n  - 4.2.[Start mode two](https://github.com/meituan/ptubes/wiki/Client-User-Guide#3-start-mode-two)\n  - 4.3.[Start mode three](https://github.com/meituan/ptubes/wiki/Client-User-Guide#4-start-mode-three)\n- 5.[Configuration usage guide](https://github.com/meituan/ptubes/wiki/Configuration-usage-guide)\n  - 5.1.[Reader Configuration](https://github.com/meituan/ptubes/wiki/Configuration-usage-guide#1-reader-configuration)\n  - 5.2.[SDK Configuration](https://github.com/meituan/ptubes/wiki/Configuration-usage-guide#2sdk-configuration)\n- 6.[Local Debugging Guide](https://github.com/meituan/ptubes/wiki/Local-debugging-guide)\n\n## License\n[Apache License, Version 2.0](LICENSE) Copyright (C) Apache Software Foundation\n\n## issues\n[Ptubes ISSUES](https://github.com/meituan/ptubes/issues)\n\n## Contact us\n\u003cimg src=\"https://raw.githubusercontent.com/wiki/meituan/ptubes/images/lianxifangshi.jpeg\" width=\"300\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeituan%2Fptubes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeituan%2Fptubes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeituan%2Fptubes/lists"}