From owner-freebsd-questions Sun Apr 14 13:15:50 2002 Delivered-To: freebsd-questions@freebsd.org Received: from fe010.worldonline.dk (fe010.worldonline.dk [212.54.64.195]) by hub.freebsd.org (Postfix) with SMTP id 7D2BE37B404 for ; Sun, 14 Apr 2002 13:15:45 -0700 (PDT) Received: (qmail 26329 invoked by uid 0); 14 Apr 2002 20:15:43 -0000 Received: from 213.237.13.224.adsl.hc.worldonline.dk (HELO NEIGAARD?MOB) (213.237.13.224) by fe010.worldonline.dk with SMTP; 14 Apr 2002 20:15:43 -0000 Date: Sun, 14 Apr 2002 22:14:49 +0200 From: =?ISO-8859-1?B?U/hyZW4gTmVpZ2FhcmQ=?= X-Mailer: The Bat! (v1.53d) Reply-To: =?ISO-8859-1?B?U/hyZW4gTmVpZ2FhcmQ=?= X-Priority: 3 (Normal) Message-ID: <15612199031.20020414221449@e-box.dk> To: Steve Bertrand Cc: freebsd-questions@freebsd.org Subject: Re: Availability script... In-Reply-To: <1018812384.1893.13.camel@thinkpad1.northnetworks.ca> References: <1018812384.1893.13.camel@thinkpad1.northnetworks.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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 Sunday, April 14, 2002, 9:26:23 PM, Steve wrote: SB> Hi there, SB> I am trying to come up with a way to automate the recovery of a failed SB> server. Below is my idea, but I need some help with the design. SB> I have 2 BSD servers, one of which is my primary and the other a backup. SB> I would like to have a script or program run every ten minutes on the SB> backup that checks the availability of the main server. If the main SB> server is not available, I would like the backup server to load the SB> pre-backed up config files of the main server into memory, then reload SB> the packages in question (apache, bind etc), as well as changing it's ip SB> address to the IP of the failed server. SB> All of the websites are backed up to the same location they would be on SB> the main server. SB> I have written the part of the script responsible for the loading of SB> conf files and restarting the services and all works very well. I need SB> help adding to script the equivilant to SB> 'if pingresponse == nul SB> dowhatever SB> else donothing' SB> Also, how do I change my ip via a config file as opposed to using SB> /stand/sysinstall? SB> Tks for all your help. I am hoping a tiny script like this will help me SB> guarantee a minimal amount of downtime. Maybe this is what you are looking for: http://www.bsdshell.net/ Or else look for heartbeat and mon (http://www.linux-ha.org), they are Linux tools but somebody on this list said that they can run on FreeBSD. -- Med venlig hilsen/Best regards, Søren Neigaard mailto:neigaard@e-box.dk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message