Anonymising Warden Databases
Now that masquerade is abandoned, we can use Smile-SA GDPR Dump.
Usage
First lets download the resources we need, we will store them in the magento dev folder as we can exclude this in our deployment pipelines.
sh
wget https://github.com/Smile-SA/gdpr-dump/releases/latest/download/gdpr-dump.phar -O dev/gdpr-dump
wget https://raw.githubusercontent.com/Smile-SA/gdpr-dump/main/app/config/example.yaml -O dev/gdpr-dump.yaml
chmod +x dev/gdpr-dumpNext, review the gdpr-dump.yaml configuration against your current raw database. And add any missing tables / columns into the configuration.
Then run the gdpr-dump application from the warden shell to dump the anonymised database to disk.
sh
DB_HOST=db DB_USER=magento DB_PASSWORD=magento DB_NAME=magento dev/gdpr-dump dev/gdpr-dump.yaml | gzip > dev/z_anonymized_db.$(date +%s).sql.gzNow we should have a anonymized GZIP'd database we can share / reimport / move forward into upstream environments.
