I know there are lots of variables here, and they're highly dependent upon the applications in the environment as well as the needs of the org. I read this post first, as the question was similar. [https://serverfault.com/questions/380701/replicate-main-mysql-db-to-a-development-server-to-play-with-real-data][1]
I thought I could add some depth from my perspective to the question and hopefully get some recommendations very specific to our environment.
- We have a standalone server that hosts an online Learning Management System.
- The LMS has thousands of users and its db is being written to quite regularly.
- The desire is to take a "snapshot" of the db, and replicate it onto the development server for testing, new builds, etc.
- The snapshot needs to be relatively close (within a few days atmost) to the live data because of the dynamic nature of the db.
- The dev server needs to be read/write, but never affect the prod server at all.
- The data in the db will have PII and needs to be sanitized before accessed by the dev team.
I'm thinking the general steps should be:
- Automate a mysqldump on some sort of schedule from prod to dev
- Run a script on dev to clean/anonymize the data
- Automate a restore of the clean data, on a schedule, into dev
Based on these requirements, am I overlooking anything obvious that could impact the data in either server or the load/resources on the server?