HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Best set-up for a backup server? (http://www.howtoforge.com/forums/showthread.php?t=13364)

trigar 12th June 2007 17:32

Best set-up for a backup server?
 
I bought a server (A) and installed as Perfect Debian Sarge with ISPConfig. All working perfectly and hosting several webs beautifully (thanks to help from you guys). The only problem was the lack of a second nameserver and a backup server to allow for downtime...

So I bought a second server (B) set up as Perfect Debian Etch, transferred ns2 to it and set up DNS slave records pointing to server A.

I then followed the howto on rsync to mirror the webs in server A across to server B.

All working perfectly, except of course that the webs on server B are not accessible, given that they have not been set-up via the Control Panel and don't have any domains pointing to them.

So really this only sorts out the nameserver problem and I suppose gives me the confidence of knowing that I could get server B up and running pretty quickly, if I had to. What it doesn't do is provide me with the ability to shutdown server A for a few hours whilst I upgrade it, or indeed cope with any unplanned downtime.

The obvious thing to do would be to copy the ISPConfig data over to server B, perhaps by doing a backup/restore through the control panel? But presumably that would mess up the slave DNS on server B. Perhaps I need to remove the slave DNS first and recreate it after? Somehow this doesn't feel right.

So, to cut this question back to a simple request, is there a recommended set-up that would provide me with:
  • Two nameservers
  • A backup server available on demand

Surely this is what everyone must want or perhaps already have, but I have spent hours reading and Googling the numerous references to multiple servers or backup servers, but I'm just not finding my answer, or perhaps I'm not recognising it when I see it!

Is the only ISPConfig answer to await ISPConfig 3, or is there a current best way to approach this?

Many thanks.

falko 13th June 2007 02:51

There's one big problem if you copy all configurations over from A to B: some configurations (e.g. Apache) contain the IP address of server A, so the configuration doesn't work on B (unless B gets A's IP address when A is down).

trigar 13th June 2007 09:32

Thanks Falko.

On the basis that everyone has to have at least two servers (for the two required nameservers) what do most people do with the second server?
  • No second nameserver
  • Leave it otherwise dormant?
  • Rsync or mirror in some other way from primary?
  • Have a mix of webs on each server to spread the load (and backup both via CP or some other way)?

Or is there a better way have setting up a resilient webhost using ISPConfig?

I do feel I am missing something fundamental, but if this is just a limitation of the otherwise fantastic ISPConfig system, then I will just try and make do until the much anticipated ISPConfig3 launches!!

Thanks.

Chris.

till 13th June 2007 09:43

ISPConfig 2 was just build zo manage single servers, do i would call it a limitation in ISPConfig 2 :)

sjau 13th June 2007 13:06

Actually, I've encountered quite a few registrars that don't require to independant nameservers... before I had my second server for .net/.org/.com and .ch domains I could setup two nameservers on the same IP (ns1/ns2) and that was accepted... now I have setup ns3 on the second server for .de and .fr domains..

trigar 13th June 2007 20:04

Quote:

Originally Posted by sjau
Actually, I've encountered quite a few registrars that don't require to independant nameservers... before I had my second server for .net/.org/.com and .ch domains I could setup two nameservers on the same IP (ns1/ns2) and that was accepted... now I have setup ns3 on the second server for .de and .fr domains..

That was exactly how I had ours set up, prior to our second server, but I had an aversion to the red failures in http://www.dnsreport.com/!

Thanks, Chris.

stefan 14th June 2007 00:05

When I understand you correct you need a high-availbility solution. How is it with a cluster?

stefan

trigar 14th June 2007 11:21

Quote:

Originally Posted by stefan
When I understand you correct you need a high-availbility solution. How is it with a cluster?

Thanks Stefan. Of course you are absolutely right, but I don't believe this is possible using ISPConfig servers and, quite frankly, I don't think my knowledge is good enough for me to start setting up Virtual Hosts without ISPConfig.

I'm coming to the conclusion that the best arrangement is going to be to set up webs on server B for www2.example.com, www2.another.com, etc, then individually rsync the content from server A for www.example.com. www.another.com, etc.

Whilst hardly an elegant solution and it certainly wouldn't provide me with the resilience I was after, nevertheless it would enable me to have a tested and known working backup system and thus the confidence of knowing that I would be able to get it swapped over pretty quickly.

It also means that I would have the flexibility of being able to host sites on server B in order to spread the load (and rsync back to server A) so that both servers are working as primaries for some sites, but with the ability to take over those sites for which they are working as backups very quickly.

As I say, "elegant" is certainly not a word that would apply, but I guess it should be adequate. Any technical reasons why this wouldn't work?

Thanks.

trigar 14th June 2007 18:32

Quote:

Originally Posted by trigar
I'm coming to the conclusion that the best arrangement is going to be to set up webs on server B for www2.example.com, www2.another.com, etc, then individually rsync the content from server A for www.example.com. www.another.com, etc.

Seems to all work fine, except that of course the owner and group are not appropriate for the destination. I.e. source web is web13, destination is say web4 (ideally these would be in sync, but there does not seem to be anywhere in ISPConfig to set the web_ID). So I believe the only solution is to change group and owner after rsync has completed?

The rsync command looks like this:

Code:

/usr/bin/rsync -avz --delete --exclude-from="/root/rsync/excludes" -e "ssh -i /root/rsync/mirror-rsync-key" syncer@hostname.domain.net:/var/www/web13/ /var/www/web4/
I knew this idea wasn't elegant, but it's starting to look positively ugly... Any thoughts? :confused:

Thanks.

sjau 14th June 2007 20:19

try:

Code:

man rsync
And look for the permission/ownership switch.

I think it should be:

Code:

-avpz


All times are GMT +2. The time now is 13:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.