Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2007 21:03:38 +0200
From:      Olivier Mueller <om-lists-bsd@omx.ch>
To:        freebsd-stable@freebsd.org
Subject:   minimizing downtime on upgrades?  (for example: mysql 4.1 -> 5.0 or php)
Message-ID:  <1179860619.14799.37.camel@bigapple.omnis.ch>

next in thread | raw e-mail | index | archive | help
Hello,

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:

[root@prod1 /usr/ports/databases/mysql50-server]# make
===>  mysql-server-5.0.41 cannot install: MySQL versions mismatch:
  mysql41-client is installed and wanted version is mysql50-client.
*** Error code 1
Stop in /usr/ports/databases/mysql50-server.

So I can only do that after the installation of mysql50-client, which
means all the services will have to be stopped during the compilation of
mysql50-server, which usually takes some time. 

Isn't there a better way?  How do you handle such cases? 

Same questions for php upgrades: on php5 upgrade, all the other php5-*
packages have to be compiled too, and keeping the webserver running
during this time is probably not the best idea.


What I'm going to try is to prepare packages of the ports I have to
upgrade on a dev/test server, and then install them with pkg_add: is
that the "right way" ? 

Thanks in advance for your advices & regards,
Olivier





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1179860619.14799.37.camel>