2

In our team, we currently all develop on our local environment, with a local database, that regularly fetches data from the production database.

However, as our production database grows, it's becoming impossible to fetch data from it and store it on our work laptops.

What are the best solutions for development databases ? Do people use remote development databases (e.g one per developer so everyone can run migrations and make changes) ?

Any direction will be appreacitedd

0

1 Answer 1

4

You should not use production data in your dev environment.

  1. It's probably illegal. Have your users given consent for their information to be processed for development/testing purposes?

  2. It's a security risk. Are your developers as careful with the dev environment as you are with the live environment?

  3. It's a bad security risk. Your developers will need to connect to the live database to get the data.

  4. It's a crazy security risk. Do you developers have work laptops? Do they put the data on them and take them home on the train?

  5. It makes testing hard. The constantly changing live data means its hard to write integration tests that always return the same result.

Best practice is to generate a fixed set of test data which evolves with your application to cover all test cases.

Create a database snapshot so you can initialize a new db with the a clean test setup quickly and automatically.

2
  • +1 don't ever use non-anonymized data in your development environment.
    – Pieter B
    Commented Sep 13, 2018 at 14:00
  • The question doesn't mention user data. I don't disagree with your points for sensitive data but there are many real world scenarios where getting data from live is necessary. Sometimes even sensitive if the business and scenario allows for it. They didn't really ask "is this legal or allowed" but "how do I do it", which wasn't answered. Not wanting to sound nit-picky but I ended here from a Google search wanting an answer to this question. Connecting to a live data base is a "security risk"? Then take it off public quickly..
    – James
    Commented Jul 6, 2020 at 23:24

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.