richardhj / privacy-dump
A utility to create anonymized database dumps
Installs: 2 259
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 1
Requires
- php: ^7.1
- ext-json: *
- ext-pdo: *
- doctrine/dbal: ^2.5
- fzaninotto/faker: ^1.8
- ifsnop/mysqldump-php: ^2.9
- nyholm/dsn: ^1.0
- symfony/config: ^4.4. || ^5.0
- symfony/console: ^4.4 || ^5.0
- symfony/dependency-injection: ^4.4 || ^5.0
- symfony/finder: ^4.4 || ^5.0
- symfony/yaml: ^4.4 || ^5.0
- theseer/tokenizer: ^1.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
This package is auto-updated.
Last update: 2024-11-15 21:28:53 UTC
README
Create purged and anonymized MySQL database dumps
About
This package provides a framework-agnostic database backup manager for creating anonymized database dumps.
It is the equivalent of mysqldump
, with additional features, at the cost of performance (PHP implementation).
The main purpose of this tool is to create anonymized dumps, in order to comply with GDPR regulations.
Features:
- Data converters (transform the data before it is dumped to the file)
- Table filtering
- Tables include list (only these tables will be included in the dump)
- Tables exclude list (not included in the dump)
Installation
composer require richardhj/privacy-dump
Other integrations
To use in a Symfony project, use richardhj/privacy-dump-bundle
.
Usage
// 1. Define configuration $options = [ 'database' => [], 'dump' => [], 'tables_include' => [], 'tables_exclude' => [], 'tables' => [], ]; // 2. Create configuration instance $config = new \Richardhj\PrivacyDump\Config\Config($options); // 3. Dump $dumper = new SqlDumper(); $dumper->dump($config, 'file.sql');
For the full options, please relate to https://github.com/Smile-SA/gdpr-dump/blob/master/docs/01-configuration.md#dump-settings.
Credits and License
This project is a modification of Smile-SA/gdpr-dump and thus licensed under the same GPLv3 License.
Changes made on the original package:
- Refactoring from standalone application to installable package
- Changes in configuration