0

I am working on database security and with using Drupal we have daily backups from a cloud server which we access remotely. What I normally do is grab a daily DB copy from the cloud server, move the file over unto my local machine, and create a local copy that I can freely work on (to mess up or fix) how I choose.

However as the company grows and more people start to work on this project, having every individual have a local copy of a DB on their machine when it contains proprietary data is a huge security risk.

Is there a way for me to import a local copy of the DB to use, without actually having a physical copy on my machine? Or would this be inevitable?

Edit: For whoever down voted this, can you at least list why so I could fix it? I am trying to get genuine answers. Not have this post deleted because you think it didn't fit the right format.

1 Answer 1

1

Well, there are two things that can be done with this.

1) Database sanitisation

You can write custom Drush sql-sanitize scripts that will sanitize the database, for example changing all usernames and passwords, as well as any other custom alterations required.

Drush SQL Sanitize scripts can be set up as webhooks, to ensure the sanitization happens automatically.

2) With D8, you mostly shouldn't need to give anyone the database at all. Functionality is migrated through configuration and the configuration API. Developers can work on code, then export their configuration, and push both the code changes as well as the exported configuration to the remote server. The configuration is then imported into the remote environment's active configuration in the database, providing the new functionality on the remote server.

I wrote a blog series on the Configuration API to help understand it better: https://www.morpht.com/blog/drupal-8-configuration-part-1-configuration-api

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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