Replicate database to another account automatically?

David Mason

Registered
May 11, 2019
2
0
1
North wales
cPanel Access Level
Root Administrator
Hi

I have someone who wants to have a direct copy of his web sites database on to another server every hour - its not a big database its about 30mb.

They cant afford downtime - so we decided to manually once a day download the data from server 1 and upload it to server 2 via myphpadmin.

Is there away to automate this kind of thing with cpanel or just in general?

Thank You
Dave
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,543
208
343
Chesapeake, VA
cPanel Access Level
DataCenter Provider
You could bash script it. Set up a cron on the source server to dump the database to a file. Then on the destination server you set up a cron to copy that SQL file over and then use the mysql command to restore that database.