0

I was wondering if anybody has developed a SQL Sanitization script for Magento 2.1 for test/dev environment?

To clarify, We make a copy of our production environment into a development environment periodically, and it would be useful/helpful (and safer) to have all clients/orders/invoices Sanitized of any personally identifiable information (names, address, email address), without deleting those customers/orders/invoices etc.

Any suggestions/sample queries/recommendations are welcome.

7
  • i haven't used one yet as our production is still based on 1.14 EE, but one thing I did do that drastically reduced possible public issues is to add a whitelist to my development server's Postfix configuration. This prevents ANY email being sent via sendmail from going out unless it's in my "approved" list (which is just my email and my testing emails).
    – Brett
    Apr 5 '17 at 0:27
  • Sadly, that option doesn't exist in CE. Apr 7 '17 at 17:37
  • I should also mention, this wouldn't be just for email security. It would be to help prevent 3rd party support from gaining access to client data, and reduces risk exposure. When we require 3rd party support (some extensions for example), we only give them access to our Dev site, NOT our production, this mitigates some risk, but still leaves a lot of wanted data available to too many people. I'm going to look into creating some scripts to do just this. Apr 7 '17 at 17:40
  • Postfix is a mail server client, nothing to do with CE vs EE. More to do with how your PHP has your mail set up.
    – Brett
    Apr 7 '17 at 17:48
  • Ahh yeah, I use a github extension that connects to our Office365 server, so that is not really an option. Good idea though. Apr 7 '17 at 17:49
0

Please use this script https://github.com/kalpa-github/m2-db-sanitization-script.git please do necessary changes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.