From owner-freebsd-questions Sun Apr 14 12:29:46 2002 Delivered-To: freebsd-questions@freebsd.org Received: from northnetworks.ca (d150-201-199.home.cgocable.net [24.150.201.199]) by hub.freebsd.org (Postfix) with ESMTP id C5A8D37B404 for ; Sun, 14 Apr 2002 12:29:34 -0700 (PDT) Received: from thinkpad1.northnetworks.ca [192.168.250.99] by northnetworks.ca [127.0.0.1] with SMTP (MDaemon.PRO.PRO.v5.0.4.R) for ; Sun, 14 Apr 2002 15:43:29 -0400 Subject: Availability script... From: Steve Bertrand To: freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="=-7BUY4zu9pFL55PMR2XgD" X-Mailer: Evolution/0.13 (Preview Release) Date: 14 Apr 2002 15:26:23 -0400 Message-Id: <1018812384.1893.13.camel@thinkpad1.northnetworks.ca> Mime-Version: 1.0 X-MDRemoteIP: 192.168.250.99 X-Return-Path: steve@northnetworks.ca X-MDaemon-Deliver-To: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-7BUY4zu9pFL55PMR2XgD Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi there, I am trying to come up with a way to automate the recovery of a failed server. Below is my idea, but I need some help with the design. I have 2 BSD servers, one of which is my primary and the other a backup. I would like to have a script or program run every ten minutes on the backup that checks the availability of the main server. If the main server is not available, I would like the backup server to load the pre-backed up config files of the main server into memory, then reload the packages in question (apache, bind etc), as well as changing it's ip address to the IP of the failed server. All of the websites are backed up to the same location they would be on the main server. I have written the part of the script responsible for the loading of conf files and restarting the services and all works very well. I need help adding to script the equivilant to 'if pingresponse == nul dowhatever else donothing' Also, how do I change my ip via a config file as opposed to using /stand/sysinstall? Tks for all your help. I am hoping a tiny script like this will help me guarantee a minimal amount of downtime. Steve Bertrand --=-7BUY4zu9pFL55PMR2XgD Content-Type: text/html; charset=utf-8 Hi there,

I am trying to come up with a way to automate the recovery of a failed server.  Below is my idea, but I need some help with the design.

I have 2 BSD servers, one of which is my primary and the other a backup.  I would like to have a script or program run every ten minutes on the backup that checks the availability of the main server.  If the main server is not available, I would like the backup server to load the pre-backed up config files of the main server into memory, then reload the packages in question (apache, bind etc), as well as changing it's ip address to the IP of the failed server.

All of the websites are backed up to the same location they would be on the main server.

I have written the part of the script responsible for the loading of conf files and restarting the services and all works very well.  I need help adding to script the equivilant to

'if pingresponse == nul
   dowhatever
else donothing'

Also, how do I change my ip via a config file as opposed to using /stand/sysinstall?

Tks for all your help.  I am hoping a tiny script like this will help me guarantee a minimal amount of downtime.

Steve Bertrand




--=-7BUY4zu9pFL55PMR2XgD-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message