Back up
Back up your database and manage your dumps with a simple command.
Back up, restore and anonymize databases


Map each column of each table you want to anonymize with a specific anonymizer.
account:
fisrt_name: firstname
last_name: lastname
email_address:
anonymizer: email
options: {domain: 'db-tools-bundle.org'}
hashed_password: passwordDbToolsBundle provides a bundle for Symfony and an experimental package for Laravel. These integrations include autoconfiguration of database connection.
Learn more about Symfony integrationLearn more about Laravel integration
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use MakinaCorpus\DbToolsBundle\Attribute\Anonymize;
#[ORM\Entity()]
#[ORM\Table(name: 'customer')]
class Customer
{
#[ORM\Column(length: 255)]
#[Anonymize(type: 'firstname')]
private ?string $firstName = null;
#[ORM\Column(length: 255)]
#[Anonymize(type: 'lastname')]
private ?string $lastName = null;
#[ORM\Column(length: 255)]
#[Anonymize(type: 'email')]
private ?string $emailAddress = null;
#[ORM\Column(length: 255)]
#[Anonymize(type: 'password')]
private ?string $hashedPassword = null;
}<?php
// config/db-tools.php
declare(strict_types=1);
return [
// ...
'anonymization' => [
'first_name' => [
'anonymizer' => 'firstname'
]
'last_name' => [
'anonymizer' => 'lastname'
]
'email_address' => [
'anonymizer' => 'email'
]
'hashed_password' => [
'anonymizer' => 'password'
]
],
];services:
postgres:
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: db
POSTGRES_USER: db
ports:
- 5439:5432
networks:
- site
dbtools:
image: makinacorpus/dbtoolsbundle:stable
networks:
- site
volumes:
- ./db_tools.config.yaml:/var/www/db_tools.config.yaml
networks:
site:Our Docker image unlocks the DbToolsBundle features for every DevOps teams. Simply add our image to your docker-compose.yaml!