Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lynxline/momyre
MOngo to MYsql simple REplicator. The package is the missing link to run replication process from the mongo cluster to the mysql databse
https://github.com/lynxline/momyre
database databases docker mariadb mariadb-database mariadb-replication mongo mongo-mariadb mongo-mysql mongo-replication mongodb mysql mysql-database replica replica-set replicaset replicate replication replication-package replicator
Last synced: about 1 month ago
JSON representation
MOngo to MYsql simple REplicator. The package is the missing link to run replication process from the mongo cluster to the mysql databse
- Host: GitHub
- URL: https://github.com/lynxline/momyre
- Owner: LynxLine
- License: other
- Created: 2022-06-21T20:54:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-27T22:03:03.000Z (about 1 year ago)
- Last Synced: 2024-11-13T18:53:51.209Z (about 2 months ago)
- Topics: database, databases, docker, mariadb, mariadb-database, mariadb-replication, mongo, mongo-mariadb, mongo-mysql, mongo-replication, mongodb, mysql, mysql-database, replica, replica-set, replicaset, replicate, replication, replication-package, replicator
- Language: Go
- Homepage:
- Size: 85 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MOMYRE
What is it?
# MOngo to MYsql simple REplicator
## Intro
The repository is missing link to run replication process from the mongo cluster to the mysql databse
That way the data from mongo databse can be used with
any compliant application for making sql queries over the data replicated from mongo databse.Also note Momyre is a work in progress and currently has some limitations.
The docker image is compact (~20MB) alpine-based, can run on Linux / Mac / Windows with
appropriate setup of Mongo custer and MySQL databse## Disclaimer
I am not a database expert and I don't know whether Momyre is actually perfectly safe for
replication. I wouldn't recommend using for anything highly sensitive until you
proof it fill your needs with appropriate restrictions.## Download the software
PC: linux/amd64:
```bash
docker pull yshurik/momyre:latest
```## Run stages
First momyre gets list of exisiting tables and compare with list of mappings.
If there are extra tables it will create them.
Also momyre gets list of columns in tables and compare with list of mappings.
If there are extra columns it will create them.
If some table/column is not present in mappings, momyre wil want to remove it.
To have it removed the momyre needs to run with ```--force``` options
## Examples of mapping data
``` yaml
emails:
from: "varchar(100)"
rcpt: "varchar(100)"
subj: "varchar(100)"
body: "blob"
```Can also map arrays into blobs as json:
``` yaml
emails:
from: "varchar(100)"
rcpts: "blob"
subj: "varchar(100)"
body: "blob"
```
In last case if you have an mongo object with multiple recipients like:
``` json
{
"from" : "[email protected]",
"rcpts" : [
"[email protected]",
"[email protected]"
],
"subj" : "test",
"body" : "test"
}
```
Then mysql/mariadb column "rcpts" will have blob with json
``` json
[ "[email protected]", "[email protected]" ]
```## Running momyre docker container
The docker container can be started with appropriate config mappings.
```bash
docker run -v ./momyre.yml:/momyre/momyre.yml -d --name momyre yshurik/momyre:latest
```