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,774
328
363
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.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
There isn't anything built in to cPanel will perform this function but the script idea that @GOT suggested may be the way to go albeit depending on the size of the database could be resource intensive