So my solution to anonymize data on our backup server where we store backups of MySQL databases in .sql
files is the following:
Created a script that copies the .sql
file from the backup server to my local workstation, automatically imports it into my database server, straight anonymizes the sensitive data, exports the database into another .sql
file, removes the original .sql
and also drops the database. Thus I end up with an anonymized .sql
file. However, I wish to make it faster by directly re-writing the values in the original .sql
file it self.
What do you think, what is the easiest method for this or is my solution already the best there is? Was thinking about using the sed
command someway, but I just have no clue ATM how to tell the script what to replace, where, how many times and with what. :/