Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timakin/gopli
DB replication tool to synchronize data with multi environments written in Golang.
https://github.com/timakin/gopli
database golang mysql replication toml
Last synced: 26 days ago
JSON representation
DB replication tool to synchronize data with multi environments written in Golang.
- Host: GitHub
- URL: https://github.com/timakin/gopli
- Owner: timakin
- Created: 2016-09-01T23:43:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-15T13:08:35.000Z (almost 8 years ago)
- Last Synced: 2024-04-17T01:14:03.898Z (8 months ago)
- Topics: database, golang, mysql, replication, toml
- Language: Go
- Homepage:
- Size: 30.7 MB
- Stars: 342
- Watchers: 17
- Forks: 21
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-discoveries - gopli - DB replication tool to synchronize data with multi environments _(`Go`)_ (DevOps Utilities)
README
gopli
========
Database backup between remote hosts (or local) written in Golang.## Feature
- High-speed parallel data fetching with goroutine concurrency
- Reuse options of connection with TOML configuration
- Gopli will release you from an annoying replication setting# TODO
- [ ] Currently MySQL only. so adopt to other management systems
- [ ] Data mask for password, credit-card number, etc...
- [ ] Response packet regulation and compression for fetched data## Install
```
go get github.com/timakin/gopli
```## Usage
Write down setting file in toml.
```
[database]
[database.local]
host = "localhost"
management_system = "mysql"
name = "app_development"
user = "root"
password = ""[database.staging]
host = "xxx.xxx.xxx.xxx"
management_system = "mysql"
name = "app_staging"
user = "root"
password = ""[database.production]
host = "yyy.yyy.yyy.yyy"
management_system = "mysql"
name = "app_production"
user = "root"
password = ""[ssh]
[ssh.local]
host = "localhost" # or "127.0.0.1"[ssh.staging]
host = "xxx.xxx.xxx.xxx"
port = "22"
user = "timakin"
key = "~/.ssh/id_rsa_staging"[ssh.production]
host = "yyy.yyy.yyy.yyy"
port = "22"
user = "remoteuser"
key = "~/.ssh/id_rsa_prod"```
```
gopli sync -from production -to staging -c config/gopli.toml
```