Replicate database to another account automatically?
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
-
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. 0 -
You could also set up mysql replication but that gets tricky if the destination server is hosting other live databases. 0 -
Hi Thanks for the quick reply. I will have a look in to the script option. 0 -
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 0
Please sign in to leave a comment.
Comments
4 comments