From owner-freebsd-questions@FreeBSD.ORG Fri Jan 21 15:14:01 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4C17106564A for ; Fri, 21 Jan 2011 15:14:01 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 8CDB78FC0A for ; Fri, 21 Jan 2011 15:14:01 +0000 (UTC) Received: by qyk8 with SMTP id 8so581479qyk.13 for ; Fri, 21 Jan 2011 07:14:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=snM3KXaI9xEgXt8uYZjNsYXgWu2tF8EF4UNSpwkEnuM=; b=P0avWdKqlUHmPTEHAutf8s5IaxKuPTglj1+O9eVo7V1B3ADfni3jUeYzMx5DviTBBd 4FiFtLwNJ2btWXstErXB69B59vSSfhrcgab+VIPCAvdRN5OcBHb/9B91YvzqjYSzzSmp YXDPD4uzhvUZq8xihGsxnupAY7K7D/Y/qRdAY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=MiiMrJa611/sH4WJtyCWcZnj4sfnCMAKILwhxaosliutaDR1RN/z7TEuh5/BotGOFY /X6Z9zHHhJ159ihpgQ9TSEQSp5P4wDN64k6B11XmDo6JhgZOw6nidhzpCPZ633jdXR9V uK3GzCk5EExwwtaVOSV21DqzQ+eWQ8llvfks4= Received: by 10.229.235.147 with SMTP id kg19mr687230qcb.61.1295622840482; Fri, 21 Jan 2011 07:14:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.88.9 with HTTP; Fri, 21 Jan 2011 07:13:29 -0800 (PST) In-Reply-To: <998111295618056@web50.yandex.ru> References: <998111295618056@web50.yandex.ru> From: Odhiambo Washington Date: Fri, 21 Jan 2011 18:13:29 +0300 Message-ID: To: Radomskiy Yuriy Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: upgrading a dozen of servers from 7.0 to 8.1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2011 15:14:02 -0000 On Fri, Jan 21, 2011 at 4:54 PM, Radomskiy Yuriy wrote: > Hello! > > I have around 15 servers running FreeBSD 7.0 across the country. > I would like to upgrade them to 7.3 or even 8.1 using binary updates. > They are primary mail servers all running apache-2.0 + php5-5.2.10, > mysql-server-5.1, exim-4.69, dovecot-1.1 > They are almost identical - they were identical a couple of years ago, but > now they have some minor differences (soft, settings, scripts) > Hardware is all the same. > All the servers are in production. > > The steps I have to do and the questions about them i have: > 1. update all soft to current versions (including change of config files) > apache - goto v2.2 > php - goto v5.3 > mysql - stick with 5.1 > exim - goto 4.73 > dovecot - goto 1.2.16 > q's: > how can upgrading to apache 2.2 + php5.3 be done with minimal downtime? > portupgrade -o lang/php52 lang/php5 That will upgrade your php from 5.2.10 to 5.2.17. Please stick with php-5.2.x unless you are sure php-5.3 will not break some web apps you are running. upgrade php-extensions the same way. can i upgrade or is it better to rebuild it from the scratch (because of > major version changes)? > You can upgrade. Please follow the instructions from http://people.freebsd.org/~rse/upgrade/freebsd-upgrade-7x-8x.txt Just note one thing I noticed while upgrading my servers: s/compat7x-`uname -m`-7.2.702000.200906.1.tbz/compat7x-`uname -m`-7.3.703000.201008.tbz/g > 2. do a binary upgrade of OS according to handbook > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html > You can do that, but I personally prefer http://people.freebsd.org/~rse/upgrade/freebsd-upgrade-7x-8x.txt. I have never used freebsd-update on any system I run, but that is out of choice, not any other reason! > > 3. rebuil all the software again > portupgrade -af > If you follow http://people.freebsd.org/~rse/upgrade/freebsd-upgrade-7x-8x.txt, there will not be any urgency in doing portupgrade -af. > > I have two scenarios for this: > I. > 1. restore a server from a backup on a dedicated machine. > 2. do all the upgrade procedures on this dedicated server. > 3. clone this upgraded server to the original server. > 4. Repeat this procedure for each server. > Advantages: > - almost garanteed reliability. > Disadvantages: > - need to sync data from the last backup with current one. > - takes very long time. > > Too tedious!! > II. > 1. restore one server from backup on a dedicated machine. > 2. do all the upgrade procedures on this restored server. > 3. write some sort of script that does the upgrate (or makes it easier). > 4. upgrate all the servers (since they are almost identical) one at a time. > Advantages: > - should be faster > Disadvantages: > - something might go wrong on some particular server(s). > Too tedious!! > Which method would you sudgest? > As I suggested above!! > Is there any other method or maybe enhancements ones to do the upgrade? > ?? > How can it be used that all servers are almost identical? > Using RSE's methods, your servers will remain as identical as they are now. Only you will end up running FreeBSD 8.x :-) > How can the process be automated? > Unattended? Never for a server!!! Scripted?? By RSE!! > Should i be looking into building binary packages of required software and > redistributing them to the servers instead of building them from the ports > tree (as it is done now)? > > No. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Damn!!