CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • How do I anonymize my database to share with other developers?
Pages: [1]

Author Topic: How do I anonymize my database to share with other developers?  (Read 447 times)

Sean Madsen

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 5
  • CiviCRM implementer/developer
    • Bikes Not Bombs
  • CiviCRM version: 4.6
  • CMS version: Drupal 7
How do I anonymize my database to share with other developers?
May 27, 2014, 09:08:50 am
I've heard that I can use a tool within Civi to anonymize the data within my database so that it's safe to share with other developers for testing purposes. How can I do this? I know there is a PHP file here: <civi_root>/bin/encryptDB.php but when I try to execute it from the command line or visit the URL with a browser, I get the following error:

ERROR: You need to send a valid user name and password to execute this file

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: How do I anonymize my database to share with other developers?
May 27, 2014, 03:41:36 pm
IMPORTANT: encryptDB will hash most of the sensitive data in your database (contact names, phones, addresses, etc). Never run this on your production site. Run it on a copy. The operation cannot be reversed.

You need to pass the arguments for the username/password and site key.

For example:

http://example.org/path/to/civicrm/bin/encryptDB.php?user=[...]&pass=[...]&key=[sitekey]

The site key can be found in your civicrm.settings.php (if you are using Drupal, it is in sites/example.org/civicrm.settings.php, or in sites/default/civicrm.settings.php.

The username and password should be the one for an admin account. It might work with any account, but that's why it requires the "site key", which must remain secret :)
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • How do I anonymize my database to share with other developers?

This forum was archived on 2017-11-26.