From owner-freebsd-stable@FreeBSD.ORG Tue May 22 19:22:22 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3CEA516A469 for ; Tue, 22 May 2007 19:22:22 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from frontmail.ipactive.de (frontmail.maindns.de [85.214.95.103]) by mx1.freebsd.org (Postfix) with ESMTP id 00D5D13C46E for ; Tue, 22 May 2007 19:22:21 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from mail.vtec.ipme.de (Q7dbb.q.ppp-pool.de [89.53.125.187]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by frontmail.ipactive.de (Postfix) with ESMTP id 3809712883F for ; Tue, 22 May 2007 21:22:15 +0200 (CEST) Received: from epeios.sz.vwsoft.com (epeios.sz.vwsoft.com [192.168.16.5]) by mail.vtec.ipme.de (Postfix) with ESMTP id 7F17C3FA01; Tue, 22 May 2007 21:21:40 +0200 (CEST) Message-ID: <465342C4.7030306@vwsoft.com> Date: Tue, 22 May 2007 21:21:40 +0200 From: Volker User-Agent: Thunderbird 2.0.0.0 (X11/20070521) MIME-Version: 1.0 To: Olivier Mueller References: <1179860619.14799.37.camel@bigapple.omnis.ch> In-Reply-To: <1179860619.14799.37.camel@bigapple.omnis.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-VWSoft-MailScanner: Found to be clean X-MailScanner-From: volker@vwsoft.com X-ipactive-MailScanner-Information: Please contact the ISP for more information X-ipactive-MailScanner: Found to be clean X-ipactive-MailScanner-From: volker@vwsoft.com Cc: freebsd-stable@freebsd.org Subject: Re: minimizing downtime on upgrades? (for example: mysql 4.1 -> 5.0 or php) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 19:22:22 -0000 On 05/22/07 21:03, Olivier Mueller wrote: > Some "freebsd-beginner" questions about how to maintain a production > server up to date day after day, with a practical example: now I have > to update a 6.1-based server from mysql 4.1 to mysql 5.0, minimizing > the downtime during the upgrade. > > In the past under other OS'es I would have taken the mysql source, > compiled the whole, and then on upgrade time: > - stopped the services (httpd, etc.) > - mysqldump of all tables > - stopped mysqld > - removed the old version (+backup) > - 'make install'ed the new one > - started mysqld > - imported the db and restarted the other services > -> 2-3 minutes downtime, depending on the size of the databases > > > Now I can't really do that under FreeBSD: if I want to prepare (just > "make" in the ports directory) the mysql50-server part, it answers: > Oliver, try something like: portupgrade -o databases/mysql50-client mysql-client portupgrade -o databases/mysql50-server mysql-server Make sure you're doing a backup of your SQL data *before* you're doing this as the MySQL server (AFAIR) is being halted at upgrade time (short after compiling everything has finished). The portupgrade commands mentioned above might just be half of the work as other ports might need an upgrade, too. I did the same some weeks ago but can't remember if there was any extra work needed. HTH Volker