A powerful database synchronization CLI tool built with Go. G-Synch enables seamless synchronization between different database systems, ensuring data consistency and integrity across your applications.
- Easy to Use: Simple command-line interface for quick setup and execution for synchronization.
- Bidirectional Sync: Synchronize data in both directions between source and target databases.
- Conflict Resolution: Built-in mechanisms to handle data conflicts during synchronization.
- Logging and Monitoring: Comprehensive logging and monitoring capabilities to track synchronization progress and troubleshoot issues.
check: Displays the current difference between the given database with the target database.sync: Initiates the synchronization process between the specified source and target databases.reverse-check: Checks for differences in the reverse direction, from target to source database.
- Multi-Database Instance Support: Synchronize different database instances such as
PostgreSQL. - Schema Mapping: Automatically maps schemas between different database systems.
- Incremental Sync: Supports incremental synchronization to minimize data transfer and improve performance.
- Logging: Detailed logging of all synchronization activities for audit and troubleshooting purposes.
git clone https://github.com/c5rogers/G-Synch.git- First make sure your system support
taskcommand. You can install it from Taskfile.dev. - After you setup the environment variables and
task.
task generate:config- Then adjust the
config.ymlfile generated with the connection string of your target and given database to synchronize. - To check the differences between the given database and the target database, run the following command:
task g:synch -- --env=<config environment> audit check <adapter>_<given_db> <adapter>_<target_db>- To perform the synchronization, use the following command:
task g:synch -- --env=<config environment> audit synch <adapter>_<given_db> <adapter>_<target_db>- To reverse check the difference from the given database to the target database, run the following command:
task g:synch -- --env=<config environment> audit reverse-check <adapter>_<given_db> <adapter>_<target_db>- To run the unit tests, use the following command:
task testContributing is welcome! See the Contributing Guide for guidelines.
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Make your changes.
- Run test
task testto ensure everything is working. - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/YourFeature). - Open a Pull Request.
Enjoy Coding :)