crystal-sync
Version, currently master branch1 version
- master branchlatestJul 19, 2023
github.com/djmaze/crystal-sync
Efficiently transmit & anonymize database dumps
Installation
# Add this to your shard.yml
dependencies:
crystal-sync:
github: djmaze/crystal-sync
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
1.8.1- License
- MIT
- Author
- Martin Honermeyer
- Target
crystal-syncfrom anonymization_config.cr
Dependencies
Runtime Dependencies
README
Crystal-Sync
Crystal-Sync is a tool for efficiently transmitting database dumps, optionally including anonymization for table data.
It follows the UNIX philosophy and is split into dump and load commands. These can be used independently from one another.
The anonymization config needs to be supplied using a DSL written in the Crystal language.
Under the hood, the tool dumps and loads the database schema and data using the official client tools for each database. The data is efficiently transmitted using a custom MessagePack format.
Currently, PostgreSQL and MySQL databases are supported.
Installation
On the system generating the configuration, you need to have Crystal 0.27.2 installed.
-
Clone this repository
-
Compile the CLI:
cd cli shards build -
The resulting binary can now be found at
bin/crystal-sync_cliinside theclisubdirectory.
Usage
The CLI is just a generator for a Crystal project with an empty anonymization config.
Complete example:
# Generate a new configuration
cd cli
bin/crystal-sync_cli generate /path/to/a/new/folder
# Compile the new configuration
cd /path/to/a/new/folder
shards build
# Run the resulting binary
bin/crystal-sync dump [...]
bin/crystal-sync load [...]
See the CLI README and the README for the generated configuration for further instructions.
Development
TODO: Write development instructions here
Contributing
- Fork it ( https://github.com/[your-github-name]/crystal-sync/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- [djmaze] Martin Honermeyer - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jul 19, 2023
- Crystal
1.8.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/djmaze/crystal-sync
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1