Date: 14 Apr 2002 15:26:23 -0400 From: Steve Bertrand <steve@northnetworks.ca> To: freebsd-questions@freebsd.org Subject: Availability script... Message-ID: <1018812384.1893.13.camel@thinkpad1.northnetworks.ca>
next in thread | raw e-mail | index | archive | help
--=-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 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8"> <META NAME="GENERATOR" CONTENT="GtkHTML/0.12.0"> </HEAD> <BODY>Hi there,<br> <br> 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.<br> <br> 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.<br> <br> All of the websites are backed up to the same location they would be on the main server.<br> <br> 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 <br> <br> 'if pingresponse == nul<br> dowhatever<br> else donothing'<br> <br> Also, how do I change my ip via a config file as opposed to using /stand/sysinstall?<br> <br> Tks for all your help. I am hoping a tiny script like this will help me guarantee a minimal amount of downtime.<br> <br> Steve Bertrand<br> <br> <br> <br> <br> </BODY> </HTML> --=-7BUY4zu9pFL55PMR2XgD-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1018812384.1893.13.camel>