StageSync CLI is a command-line tool written in Go that synchronizes data between different stages of a database. It uses a YAML configuration file to specify the source and target databases, as well as the tables and columns to sync. The tool is designed to handle complex scenarios, such as syncing only specific rows, not deleting rows in the target that don't exist in the source, and more. It's a powerful tool for managing data propagation across different stages of your application.
go install github.com/kilianstallz/stage-sync/cmd/stage-sync@latest
- Define a new configuration by creating a new
config.yaml
file like in the Example. - Configure tables like in the Table Description.
stage-sync run -s [config.yaml] --source [SOURCE_STAGE] --target [TARGET_STAGE] -c
Look at stage-sync run -h for help.
-s Configuration File Path
--source/target Source and target stage selection
-c Confirm Flag. If not set, task is executed as dry-run.
- Currently only supporting PostgreSQL
- There may be issues updating referenced id's.