Bash script to move MySQL tables from one db to another
$30-100 USD
Paid on delivery
We need a bash script (or PHP - just needs to run on a LAMP stack) that will do the following steps:
1: Copy all tables in Database B to Database C
2: Copy all tables in Database A to Database B
3: Run a number of SQL statements on database B
The real world scenario is that we have a live database and a development database, we want to be able to easily copy all data from the live database (A) to the development database (B) whilst maintaining a copy of B in C (just in case...). After performing the switches, we need to run a few sql statements to do things like changing user email addresses etc - these aren't defined yet so just write the script with the ability to add new SQL statements in as we choose.
So when complete database A will be the same, database B will be an identical copy of A and database C will be a copy of B before B was replaced with a copy of A.
Thanks!
Project ID: #3807423