On Thu, 16 Oct 2003, Nicolas Kowalski wrote:
> My question is : how can I stop the IMAP processes on the server, and
> keep the mailboxes consistent ?

The answer is: don't stop the IMAP processes.  Let them continue to run.
You'll generally do more harm by stopping them than you will by letting
them run the old version.  If you absolutely must stop an IMAP process,
sending it a HUP signal is better than some other way.

The correct thing to do is just to replace the binaries.  Instead of
trying to overwrite the old binaries (which you can't do because of the
"text file busy" condition), either rename or delete the old binaries then
install the new ones.

For example, here is what I do.  This may be a bit more elaborate than
what you want, but it will give you the general idea.  You don't have to
copy this verbatim (in fact, you shouldn't!!) but rather just use it as an
example of a real-life sysadmin maintenance of the imapd binary.
        rm imapd.new imapd.oold
        cp /usr/src/imap-2003/imapd/imapd imapd.new
        mv imapd.old imapd.oold
        mv imapd imapd.old;ln imapd.new imapd

imapd.new is always the "new" version and is generally the running
production version.  imapd.old is the "old" version for possible rollback
if the new version has a problem, and imapd.oold is the second older
version.  A rollback is accomplished with:
        rm imapd;ln imapd.old imapd

Note that I do the actual replacement of imapd (a two instruction process)
in a single command line.  That's to minimize the amount of time that
there isn't an imapd binary.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

Reply via email to