If my site goes down, how can I keep it up? (newbie question)

bls24

Well-Known Member
May 12, 2007
78
0
156
Presently I have my own dedicated server at the planet.. there was recently a huge explosion at one of their datacenters (not mine), but it has made me think about what a financial loss it would be for my site to even be down for 1 day.

I read a bit about "clustering" and whatnot, but I don't know much about it.
I've read others on forums explain that if their site was to go down, a "backup" would kick in from another datacenter and their site would remain online.

How would one go about achieving this?
 

tolra

Active Member
Mar 4, 2006
27
0
151
One option is to have an identical copy of your site on a second server at a second data centre and send updates to the site to this backup server at some interval, e.g. every 60 minutes.

You then use a service such as http://www.dnsmadeeasy.com/ which can monitor your main IP and when it detects it is not responding updates your DNS to point to your backup server.
 

bls24

Well-Known Member
May 12, 2007
78
0
156
When you send updates to the 2nd server, how does that work.

Does it have to be like the cpanel move site function (where it copies EVERYTHING) or can you configure something that only updates the database / new files?

I am not asking for specifics, just a rough idea how this process works.
 

tolra

Active Member
Mar 4, 2006
27
0
151
You only need to copy changed files and database updates. However if you add new mail accounts and the like you'll have to find away to get those over as well.
 

srobinson

Well-Known Member
Feb 6, 2008
81
0
56
Well if your copying CPanel accounts over then you could use rysnc in conjunction with a cronjob that runs every 60 minutes? Below is an example of a cronjob of mine that runs at midnight every night and syncs the files on rsync://cpgs.cpanel.net/gsfiles with my /home/cpgsbla/public_html folder

0 4 * * * rsync -rlptD rsync://cpgs.cpanel.net/gsfiles /home/cpgsbla/public_html 2>&1 > /dev/null


Looking at that though, the protocol is rsync on the cpgs.cpanel.net server so you may need to do a bit of research there :)