## Database anonymization, synthetic data generation and logical dump ### Greenmask Overview
Greenmask is a powerful open-source utility that is designed for logical database backup dumping, anonymization, synthetic data generation and restoration. It is stateless and does not require any changes to your database schema. It is designed to be highly customizable and backward-compatible with existing PostgreSQL utilities, fast and reliable. #### Use Cases * **Sensitive Data Sanitization**: Anonymize, transform, and mask PII for staging, analytics, and testing environments, ensuring compliance and security. * **Backup & Restore**: A robust, drop-in replacement for `pg_dump`/`pg_restore` and `mysqldump`, handling schema and data with ease. * **Local Development**: Quickly spin up lightweight, referentially intact subsets of production databases for developers. * **Synthetic Data Generation**: Generate realistic test data from scratch to populate empty environments using the [CMD transformer](https://docs.greenmask.io/latest/built_in_transformers/standard_transformers/cmd/) and [custom transformations](https://docs.greenmask.io/latest/built_in_transformers/standard_transformers/cmd/). ### Changes * Implemented `-C` (`--create`) parameter logic for restoration [#414](https://github.com/GreenmaskIO/greenmask/pull/414) * Added in-memory storage for the `validate` command [#405](https://github.com/GreenmaskIO/greenmask/pull/405) * Fixed stack overflow issue in inherited DFS logic [#409](https://github.com/GreenmaskIO/greenmask/pull/409) * Properly escape double-quote characters in SQL identifier quoting [#407](https://github.com/GreenmaskIO/greenmask/pull/407) * Fixed dump status detection when metadata is missing [#404](https://github.com/GreenmaskIO/greenmask/pull/404) * Revised playground documentation and added a demo [#406](https://github.com/GreenmaskIO/greenmask/pull/406) * Bumped Go version and fixed CI/linting warnings [#410](https://github.com/GreenmaskIO/greenmask/pull/410) * Added Cloudflare R2 compatibility guide and fixed documentation typos [#401](https://github.com/GreenmaskIO/greenmask/pull/401) * Fixed ACL entries restoration when using `--restore-in-order` [#345](https://github.com/GreenmaskIO/greenmask/pull/345) * Re-structured contributor documentation [#400](https://github.com/GreenmaskIO/greenmask/pull/400) * Enhanced and documented PostgreSQL version update procedure [#383](https://github.com/GreenmaskIO/greenmask/pull/383) * Fixed deterministic order in PK/FK introspection query, resolving issues with composite foreign keys in the subset system [#398](https://github.com/GreenmaskIO/greenmask/pull/398) * Updated sponsor logo [#399](https://github.com/GreenmaskIO/greenmask/pull/399) * Supported PostgreSQL 18 [#380](https://github.com/GreenmaskIO/greenmask/pull/380) * Added `postcode` type to `Masking` transformer for masking postcodes [#362](https://github.com/GreenmaskIO/greenmask/pull/362) * Added `skip_not_exist` parameter to `Json` transformer operations. This allows skipping the operation if the key does not exist by the provided path [#356](https://github.com/GreenmaskIO/greenmask/pull/356) * Fixed temp file cleanup order in schema-only dump [#379](https://github.com/GreenmaskIO/greenmask/pull/379) * Fixed TOC entry duplication when merging schema and data sections [#378](https://github.com/GreenmaskIO/greenmask/pull/378) * Fixed RandomPerson hash generation [#327](https://github.com/GreenmaskIO/greenmask/pull/327) * Implemented `--quiet` flag for `list-dumps` command [#331](https://github.com/GreenmaskIO/greenmask/pull/331). This makes it easy to use list-dumps in shell pipelines like: ```bash greenmask list-dumps -q | xargs -I {} greenmask delete {} ``` * Implemented an official greenmask installation script [#334](https://github.com/GreenmaskIO/greenmask/pull/334). Now greenmask can be installed with a single command: ```bash curl -fsSL https://greenmask.io/install.sh | bash ``` * Added a `--description` flag to the dump command, store it in metadata, and display it in `list-dumps` for better context [#339](https://github.com/GreenmaskIO/greenmask/pull/339). * Fixed logic in ExcludeSchema filter: now correctly returns false for excluded schemas, preventing them from being restored [#343](https://github.com/GreenmaskIO/greenmask/pull/343) * Fix: ensure SEQUENCE SET and BLOB entries are restored after topologically sorted tables when using `--restore-in-order` [#340](https://github.com/GreenmaskIO/greenmask/pull/340) * Fixed command links in index documentation [#337](https://github.com/GreenmaskIO/greenmask/pull/337) * Fix: prevent panic when using `latest` dump id with `restore` command if no dumps exist in storage [#346](https://github.com/GreenmaskIO/greenmask/pull/346) * Fixed a panic in the introspection function when virtual references were set on tables without primary keys [#309](https://github.com/GreenmaskIO/greenmask/issues/309). Virtual references on such tables are still not supported, but the function no longer panics. Related MR [#315](https://github.com/GreenmaskIO/greenmask/pull/315). * Fixed a case when greenmask hash engine ignores GREENMASK_GLOBAL_SALT [#317](https://github.com/GreenmaskIO/greenmask/issues/317) Related MR [#318](https://github.com/GreenmaskIO/greenmask/pull/318). * Added support for dynamic parameters in the Replace transformer, allowing values to be dynamically replaced based on column values. This feature enables spreading the same value across multiple columns. See the [documentation](https://docs.greenmask.io/latest/built_in_transformers/standard_transformers/replace/) for examples. [#293](https://github.com/GreenmaskIO/greenmask/pull/293) * Updated the `--verbose` flag to a boolean type. It is now `true` if provided and `false` otherwise. [#282](https://github.com/GreenmaskIO/greenmask/pull/282) * Fixed a bug in the `RandomDate` transformer where minutes were not truncated as expected. [#298](https://github.com/GreenmaskIO/greenmask/pull/298) * Updated go dependencies to the latest. [#304](https://github.com/GreenmaskIO/greenmask/pull/304) * Bump dependencies and upgraded go to 1.24 [#285](https://github.com/GreenmaskIO/greenmask/pull/285). * Changed Oid type in TOC archive library [#286](https://github.com/GreenmaskIO/greenmask/pull/286). Closes [#284](https://github.com/GreenmaskIO/greenmask/issues/284) * Revised documentation related to the log level values [#287](https://github.com/GreenmaskIO/greenmask/pull/287). Closes [#283](https://github.com/GreenmaskIO/greenmask/issues/283) * Implemented [RandomCompany](https://docs.greenmask.io/latest/built_in_transformers/standard_transformers/random_company/) transformer - it's a multi-column transformer, that generates a company data with attributes `CompanyName` and `CompanyName` [#273](https://github.com/GreenmaskIO/greenmask/pull/273) [#274](https://github.com/GreenmaskIO/greenmask/pull/274). * Fixed a case when transformers with column containers were not printed on `greenmask list-transformers` command call [#275](https://github.com/GreenmaskIO/greenmask/pull/275). * Fixed `RandomEmail` transformer bug when an incorrect buffer size for hex-encoded symbols resulted in a `\0` appearing in the string [#278](https://github.com/GreenmaskIO/greenmask/pull/278). * Fixed typo in database_subset.md docs [#271](https://github.com/GreenmaskIO/greenmask/pull/271) * Revised README.md [#280](https://github.com/GreenmaskIO/greenmask/pull/280) #### Releases list: * [v0.2.9](https://github.com/GreenmaskIO/greenmask/releases/tag/v0.2.9) * [v0.2.10](https://github.com/GreenmaskIO/greenmask/releases/tag/v0.2.10) * [v0.2.11](https://github.com/GreenmaskIO/greenmask/releases/tag/v0.2.11) * [v0.2.12](https://github.com/GreenmaskIO/greenmask/releases/tag/v0.2.12) * [v0.2.13](https://github.com/GreenmaskIO/greenmask/releases/tag/v0.2.13) * [v0.2.14](https://github.com/GreenmaskIO/greenmask/releases/tag/v0.2.14) * [v0.2.15](https://github.com/GreenmaskIO/greenmask/releases/tag/v0.2.15) * [v0.2.16](https://github.com/GreenmaskIO/greenmask/releases/tag/v0.2.16) * [v0.2.17](https://github.com/GreenmaskIO/greenmask/releases/tag/v0.2.17) ### Links Feel free to reach out to us if you have any questions or need assistance: * [Greenmask repository](https://github.com/GreenmaskIO/greenmask) * [Documentation](https://docs.greenmask.io/latest/) * [Discord](https://discord.gg/tAJegUKSTB) * [Email](mailto:[email protected]) * [Twitter](https://twitter.com/GreenmaskIO) * [Telegram [RU]](https://t.me/greenmask_ru) * [DockerHub](https://hub.docker.com/r/greenmask/greenmask)
