Get diff and sync between two databases in the same host created by MariaDB or MySQL.
- over JDK 17
- MariaDB 10.6, 10.11, 11.4, 11.5, 11.6, 11.7, 11.8
- MySQL 8.0.31 - 8.0.42
When put JSON to stdin, get a result from stdout by JSON.
Below, it's a simple usage.
Cli document is here.
echo '${json}' | java -jar magentadesk-cli.jar --mode=${mode}
(args)
name | value | remarks |
---|---|---|
--mode | (required)diff, sync or maintenance | 'diff' is get diff, 'sync' is reflected used by diff results, 'maintenance' is under maintenance concerned base and compare. |
--logPath | log written path. | when 'stdout', write out to stdout, when 'stderr', write out to stderr. |
--addSeconds | add seconds in log time | default is 60x60x9, it means 'ja', if 0, it means 'en'. |
(full)
echo '${json}' \
| [MD_ENV=${mdEnv}] \
[MD_OUTPUT=${mdOutput}] \
[MD_LIMIT_LENGTH=${mdLimitLength}] \
[MD_LIMIT_MISMATCH_COUNT=${mdLimitMismatchCount}] \
[MD_HOME=${mdHome}] \
[MD_WAIT=${mdWait}] \
java -jar magentadesk-cli.jar --mode=${mode} [--logPath=${logPath}] [--addSeconds=${addSeconds}]
No stdin, startup http server.
Below, it's a simple usage.
Web document is here.
java -jar magentadesk-web.jar
(args)
name | value | remarks |
---|---|---|
--logPath | log written path. | when 'stdout', write out to stdout, when 'stderr', write out to stderr. |
--addSeconds | add seconds in log time | default is 60x60x9, it means 'ja', if 0, it means 'en'. |
--webHost | listen host | default is 0.0.0.0. |
--webPort | listen port | default is 8710. |
(full)
[MD_ENV=${mdEnv}] \
[MD_OUTPUT=${mdOutput}] \
[MD_LIMIT_LENGTH=${mdLimitLength}] \
[MD_LIMIT_MISMATCH_COUNT=${mdLimitMismatchCount}] \
[MD_HOME=${mdHome}] \
[MD_WAIT=${mdWait}] \
java -jar magentadesk-web.jar [--logPath=${logPath}] [--addSeconds=${addSeconds}] \
[--webHost=${webHost}] [--webPort=${webPort}]
name | remarks |
---|---|
MD_ENV | if 'DEBUG', log in detail. |
MD_OUTPUT | if 'PRETTY', write out json result in pretty. |
MD_LIMIT_LENGTH | when diff and over this, returned value is to hash. default is 10000. |
MD_LIMIT_MISMATCH_COUNT | when diff and over this, returned mismatch records is convert empty. default is 10000. |
MD_HOME | default is ${HOME}/.magentadesk. There is a home directory, by commands which execute in sync and at local database storage. |
MD_WAIT | if 'WAIT', waiting until getting lock. Default is 'NOWAIT'. |
- Use checksum, checksum is different, as a result, to extract record diff takes more time.
- In many records, to extract diff may take much time.
- Mainly, magentadesk is target to 'MASTER DATA'.