Skip to content

richardhj/privacy-dump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages