I have a database called LIVE and I want to create a scenario were I copy the LIVE database every night at 2:30 am. I want the copied database to be called REPORT. So every night I want the REPORT database to be overwritten by the content of the LIVE database. I found a way to do this by running a cron job with mysqldbcopy.
30 2 * * * mysqldbcopy --source=user:pwd@localhost --destination=user:pwd@LIVE:REPORT
I need to know if the code above when executed by cron will overwrite REPORT with the LIVE database every night at 2.30 because I am confused by the copy statement. Copy seems like a one time thing. So will the code above :
Create a database called REPORT Copy LIVE database into REPORT Overwrite REPORT the next day with the latest copy of LIVE and continuously do so. If my code above does not do that can someone adjust it to do that please.