Web Hosting Talk







View Full Version : can you do this?


fatbargains
05-31-2002, 04:19 AM
can you run one site (1 domain) on 2 different servers? if one server is down, the other server will take over. can i do this w/ two different hosts? if so how? thanks.

WebmastTroy
05-31-2002, 04:26 AM
In sort, yes, that can be done.

For more of an explanation, your gonna have to use the search button and look. There have been many conversations about making sites and servers redundant.

fatbargains
05-31-2002, 04:53 AM
So for the DNS, i'll just have to put different nameservers in? like

ns1.domain1.com
ns2.domain1.com

ns1.domain2.com
ns2.domain2.com


sounds right?

toma1708
05-31-2002, 04:59 AM
I think it is possible and it works for me.

First of all you have to setup 2 identical accounts (mainly email accounts) on these 2 different servers.

After that you decide which is the "main" account and which is the "secondary" one.

Register the nameservers for that domain in this order:

ns1.maindomainnameserver.com
ns2.maindomainnameserver.com
ns3.secondarydomainnameserver.com
ns4.secondarydomainnameserver.com

Result: when your "main"server is down, all requests will be redirected to your "secondary" account through ns3 & ns4.secondarynameserver.com.

You will be covered for HTTP and POP/SMTP sevices but not if you run MySQL databases. In this case you have to copy/update the content from "main" to "secondary".

In order to do this you can use Telnet and the following commands:

Backup:
mysqldump -u db_User -p Database_Name >/home/yourusername/db_backup.sql

Copy the file db_backup.sql in your "secondary" account (don't forget the path) and restore it using the command below.

Restore:
mysql -udb_User -p Database_Name>/home/yourusername/db_backup.sql

Good luck.