Perhaps I am misreading this, but I am having difficulty understanding how your requirement is any different from built-in MySQL replication.
With MySQL replication, the master database writes changes to a binary log file. The slaves connect to the master, read the binary logs, write them to their local relay log, and play the statements back.
Please understand that realtime copy and backup are not the same thing. A real-time slave can help you recover from certain types of problems, but cannot resolve data-corruption issues (oops, I dropped that table!). For that, you need point-in-time backups. With a backup and a copy of the binary logs, you can recover from almost any type of failure by replaying the binary logs up to the point where the problem occurred.
MySQL RDS allows you to do two options
OPTION #1
You set up a Read Slave. Then, run the reports from it. There is a tool in the RDS CLI called rds-create-db-instance-read-replica
to create a Read Slave from a Running RDS instance. The following are done under the hood:
- Snapshot Made
- Snapshot Brought Up
- CHANGE MASTER TO executed with proper binary log and position
OPTION #2
Take a live snapshot of Production. Then, open a new instance using that snapshot.
The tools for this are
rds-create-db-snapshot
rds-restore-db-instance-from-db-snapshot
CONCLUSION
The only difference between these options
- the Read Slave is continuous
- Snaphot brought up as a point-in-time Instance
In both cases, once you done, simply drop the new Instance (saves money) at your discretion.
If you combine the two ideas, you could load your PHP script's output into the point-time instance. Any needed data to retrieve from production could be read from the Read Slave to prevent further load issues with production.
WARNING
Bringing up instances can be time-consuming. So, plan to have the instance brought up early enough for report and import time.
This is more ranting and brainstorming than a concrete answer.
Best Answer
Do not try to make it harder than it actually is. Replication mechanism build-in mySQL will be the best for that. There is a ton of tutorials in google, ex.:
https://fromdual.com/how_to_setup_mysql_master-slave_replication
Basically, You need master-slave configuration.