bugzilla-4intranet/docs/en/html/upgrade.html

941 lines
19 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Upgrading to New Releases</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="The Bugzilla Guide - 3.6.3
Release"
HREF="index.html"><LINK
REL="UP"
TITLE="Installing Bugzilla"
HREF="installing-bugzilla.html"><LINK
REL="PREVIOUS"
TITLE="UNIX (non-root) Installation Notes"
HREF="nonroot.html"><LINK
REL="NEXT"
TITLE="Administering Bugzilla"
HREF="administration.html"></HEAD
><BODY
CLASS="section"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Bugzilla Guide - 3.6.3
Release</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="nonroot.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 2. Installing Bugzilla</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="administration.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="upgrade"
>2.7. Upgrading to New Releases</A
></H1
><P
>Upgrading to new Bugzilla releases is very simple. There is
a script included with Bugzilla that will automatically
do all of the database migration for you.</P
><P
>The following sections explain how to upgrade from one
version of Bugzilla to another. Whether you are upgrading
from one bug-fix version to another (such as 3.0.1 to 3.0.2)
or from one major version to another (such as from 3.0 to 3.2),
the instructions are always the same.</P
><DIV
CLASS="note"
><P
></P
><TABLE
CLASS="note"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; Any examples in the following sections are written as though the
user were updating to version 2.22.1, but the procedures are the
same no matter what version you're updating to. Also, in the
examples, the user's Bugzilla installation is found at
<TT
CLASS="filename"
>/var/www/html/bugzilla</TT
>. If that is not the
same as the location of your Bugzilla installation, simply
substitute the proper paths where appropriate.
</P
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="upgrade-before"
>2.7.1. Before You Upgrade</A
></H2
><P
>Before you start your upgrade, there are a few important
steps to take:</P
><P
></P
><OL
TYPE="1"
><LI
><P
>&#13; Read the <A
HREF="http://www.bugzilla.org/releases/"
TARGET="_top"
>Release
Notes</A
> of the version you're upgrading to,
particularly the "Notes for Upgraders" section.
</P
></LI
><LI
><P
>&#13; View the Sanity Check (<A
HREF="sanitycheck.html"
>Section 3.16</A
>) page
on your installation before upgrading. Attempt to fix all warnings
that the page produces before you go any further, or you may
experience problems during your upgrade.
</P
></LI
><LI
><P
>&#13; Shut down your Bugzilla installation by putting some HTML or
text in the shutdownhtml parameter
(see <A
HREF="parameters.html"
>Section 3.1</A
>).
</P
></LI
><LI
><P
>&#13; Make a backup of the Bugzilla database.
<EM
>THIS IS VERY IMPORTANT</EM
>. If
anything goes wrong during the upgrade, your installation
can be corrupted beyond recovery. Having a backup keeps you safe.
</P
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/warning.gif"
HSPACE="5"
ALT="Warning"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; Upgrading is a one-way process. You cannot "downgrade" an
upgraded Bugzilla. If you wish to revert to the old Bugzilla
version for any reason, you will have to restore your database
from this backup.
</P
></TD
></TR
></TABLE
></DIV
><P
>Here are some sample commands you could use to backup
your database, depending on what database system you're
using. You may have to modify these commands for your
particular setup.</P
><P
></P
><DIV
CLASS="variablelist"
><DL
><DT
>MySQL:</DT
><DD
><P
>&#13; <B
CLASS="command"
>mysqldump --opt -u bugs -p bugs &#62; bugs.sql</B
>
</P
></DD
><DT
>PostgreSQL:</DT
><DD
><P
>&#13; <B
CLASS="command"
>pg_dump --no-privileges --no-owner -h localhost -U bugs
&#62; bugs.sql</B
>
</P
></DD
></DL
></DIV
></LI
></OL
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="upgrade-files"
>2.7.2. Getting The New Bugzilla</A
></H2
><P
>There are three ways to get the new version of Bugzilla.
We'll list them here briefly and then explain them
more later.</P
><P
></P
><DIV
CLASS="variablelist"
><DL
><DT
>CVS (<A
HREF="upgrade.html#upgrade-cvs"
>Section 2.7.2.2</A
>)</DT
><DD
><P
>&#13; If have <B
CLASS="command"
>cvs</B
> installed on your machine
and you have Internet access, this is the easiest way to
upgrade, particularly if you have made modifications
to the code or templates of Bugzilla.
</P
></DD
><DT
>Download the tarball (<A
HREF="upgrade.html#upgrade-tarball"
>Section 2.7.2.3</A
>)</DT
><DD
><P
>&#13; This is a very simple way to upgrade, and good if you
haven't made many (or any) modifications to the code or
templates of your Bugzilla.
</P
></DD
><DT
>Patches (<A
HREF="upgrade.html#upgrade-patches"
>Section 2.7.2.4</A
>)</DT
><DD
><P
>&#13; If you have made modifications to your Bugzilla, and
you don't have Internet access or you don't want to use
cvs, then this is the best way to upgrade.
</P
><P
>&#13; You can only do minor upgrades (such as 3.0 to 3.0.1 or
3.0.1 to 3.0.2) with patches.
</P
></DD
></DL
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="upgrade-modified"
>2.7.2.1. If you have modified your Bugzilla</A
></H3
><P
>&#13; If you have modified the code or templates of your Bugzilla,
then upgrading requires a bit more thought and effort.
A discussion of the various methods of updating compared with
degree and methods of local customization can be found in
<A
HREF="cust-templates.html#template-method"
>Section 6.3.2</A
>.
</P
><P
>&#13; The larger the jump you are trying to make, the more difficult it
is going to be to upgrade if you have made local customizations.
Upgrading from 3.0 to 3.0.1 should be fairly painless even if
you are heavily customized, but going from 2.18 to 3.0 is going
to mean a fair bit of work re-writing your local changes to use
the new files, logic, templates, etc. If you have done no local
changes at all, however, then upgrading should be approximately
the same amount of work regardless of how long it has been since
your version was released.
</P
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="upgrade-cvs"
>2.7.2.2. Upgrading using CVS</A
></H3
><P
>&#13; This requires that you have cvs installed (most Unix machines do),
and requires that you are able to access cvs-mirror.mozilla.org
on port 2401, which may not be an option if you are behind a
highly restrictive firewall or don't have Internet access.
</P
><P
>&#13; The following shows the sequence of commands needed to update a
Bugzilla installation via CVS, and a typical series of results.
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;bash$ <B
CLASS="command"
>cd /var/www/html/bugzilla</B
>
bash$ <B
CLASS="command"
>cvs login</B
>
Logging in to :pserver:anonymous@cvs-mirror.mozilla.org:2401/cvsroot
CVS password: <EM
>('anonymous', or just leave it blank)</EM
>
bash$ <B
CLASS="command"
>cvs -q update -r BUGZILLA-2_22_1 -dP</B
>
P checksetup.pl
P collectstats.pl
P docs/rel_notes.txt
P template/en/default/list/quips.html.tmpl
<EM
>(etc.)</EM
>
</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="caution"
><P
></P
><TABLE
CLASS="caution"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/caution.gif"
HSPACE="5"
ALT="Caution"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; If a line in the output from <B
CLASS="command"
>cvs update</B
> begins
with a <SAMP
CLASS="computeroutput"
>C</SAMP
>, then that represents a
file with local changes that CVS was unable to properly merge. You
need to resolve these conflicts manually before Bugzilla (or at
least the portion using that file) will be usable.
</P
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="upgrade-tarball"
>2.7.2.3. Upgrading using the tarball</A
></H3
><P
>&#13; If you are unable (or unwilling) to use CVS, another option that's
always available is to obtain the latest tarball from the <A
HREF="http://www.bugzilla.org/download/"
TARGET="_top"
>Download Page</A
> and
create a new Bugzilla installation from that.
</P
><P
>&#13; This sequence of commands shows how to get the tarball from the
command-line; it is also possible to download it from the site
directly in a web browser. If you go that route, save the file
to the <TT
CLASS="filename"
>/var/www/html</TT
>
directory (or its equivalent, if you use something else) and
omit the first three lines of the example.
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;bash$ <B
CLASS="command"
>cd /var/www/html</B
>
bash$ <B
CLASS="command"
>wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-2.22.1.tar.gz</B
>
<EM
>(Output omitted)</EM
>
bash$ <B
CLASS="command"
>tar xzvf bugzilla-2.22.1.tar.gz</B
>
bugzilla-2.22.1/
bugzilla-2.22.1/.cvsignore
<EM
>(Output truncated)</EM
>
bash$ <B
CLASS="command"
>cd bugzilla-2.22.1</B
>
bash$ <B
CLASS="command"
>cp ../bugzilla/localconfig* .</B
>
bash$ <B
CLASS="command"
>cp -r ../bugzilla/data .</B
>
bash$ <B
CLASS="command"
>cd ..</B
>
bash$ <B
CLASS="command"
>mv bugzilla bugzilla.old</B
>
bash$ <B
CLASS="command"
>mv bugzilla-2.22.1 bugzilla</B
>
</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/warning.gif"
HSPACE="5"
ALT="Warning"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; The <B
CLASS="command"
>cp</B
> commands both end with periods which
is a very important detail--it means that the destination
directory is the current working directory.
</P
></TD
></TR
></TABLE
></DIV
><P
>&#13; This upgrade method will give you a clean install of Bugzilla.
That's fine if you don't have any local customizations that you
want to maintain. If you do have customizations, then you will
need to reapply them by hand to the appropriate files.
</P
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="upgrade-patches"
>2.7.2.4. Upgrading using patches</A
></H3
><P
>&#13; A patch is a collection of all the bug fixes that have been made
since the last bug-fix release.
</P
><P
>&#13; If you are doing a bug-fix upgrade&#8212;that is, one where only the
last number of the revision changes, such as from 2.22 to
2.22.1&#8212;then you have the option of obtaining and applying a
patch file from the <A
HREF="http://www.bugzilla.org/download/"
TARGET="_top"
>Download Page</A
>.
</P
><P
>&#13; As above, this example starts with obtaining the file via the
command line. If you have already downloaded it, you can omit the
first two commands.
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;bash$ <B
CLASS="command"
>cd /var/www/html/bugzilla</B
>
bash$ <B
CLASS="command"
>wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-2.22-to-2.22.1.diff.gz</B
>
<EM
>(Output omitted)</EM
>
bash$ <B
CLASS="command"
>gunzip bugzilla-2.22-to-2.22.1.diff.gz</B
>
bash$ <B
CLASS="command"
>patch -p1 &#60; bugzilla-2.22-to-2.22.1.diff</B
>
patching file checksetup.pl
patching file collectstats.pl
<EM
>(etc.)</EM
>
</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/warning.gif"
HSPACE="5"
ALT="Warning"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; Be aware that upgrading from a patch file does not change the
entries in your <TT
CLASS="filename"
>CVS</TT
> directory.
This could make it more difficult to upgrade using CVS
(<A
HREF="upgrade.html#upgrade-cvs"
>Section 2.7.2.2</A
>) in the future.
</P
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="upgrade-completion"
>2.7.3. Completing Your Upgrade</A
></H2
><P
>&#13; Now that you have the new Bugzilla code, there are a few final
steps to complete your upgrade.
</P
><P
></P
><OL
TYPE="1"
><LI
><P
>&#13; If your new Bugzilla installation is in a different
directory or on a different machine than your old Bugzilla
installation, make sure that you have copied the
<TT
CLASS="filename"
>data</TT
> directory and the
<TT
CLASS="filename"
>localconfig</TT
> file from your old Bugzilla
installation. (If you followed the tarball instructions
above, this has already happened.)
</P
></LI
><LI
><P
>&#13; If this is a major update, check that the configuration
(<A
HREF="configuration.html"
>Section 2.2</A
>) for your new Bugzilla is
up-to-date. Sometimes the configuration requirements change
between major versions.
</P
></LI
><LI
><P
>&#13; If you didn't do it as part of the above configuration step,
now you need to run <B
CLASS="command"
>checksetup.pl</B
>, which
will do everything required to convert your existing database
and settings for the new version:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;bash$ <B
CLASS="command"
>cd /var/www/html/bugzilla</B
>
bash$ <B
CLASS="command"
>./checksetup.pl</B
>
</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/warning.gif"
HSPACE="5"
ALT="Warning"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; The period at the beginning of the command
<B
CLASS="command"
>./checksetup.pl</B
> is important and can not
be omitted.
</P
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="caution"
><P
></P
><TABLE
CLASS="caution"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/caution.gif"
HSPACE="5"
ALT="Caution"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; If this is a major upgrade (say, 2.22 to 3.0 or similar),
running <B
CLASS="command"
>checksetup.pl</B
> on a large
installation (75,000 or more bugs) can take a long time,
possibly several hours.
</P
></TD
></TR
></TABLE
></DIV
></LI
><LI
><P
>&#13; Clear any HTML or text that you put into the shutdownhtml
parameter, to re-activate Bugzilla.
</P
></LI
><LI
><P
>&#13; View the Sanity Check (<A
HREF="sanitycheck.html"
>Section 3.16</A
>) page in your
upgraded Bugzilla.
</P
><P
>&#13; It is recommended that, if possible, you fix any problems
you see, immediately. Failure to do this may mean that Bugzilla
will not work correctly. Be aware that if the sanity check page
contains more errors after an upgrade, it doesn't necessarily
mean there are more errors in your database than there were
before, as additional tests are added to the sanity check over
time, and it is possible that those errors weren't being
checked for in the old version.
</P
></LI
></OL
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="upgrade-notifications"
>2.7.4. Automatic Notifications of New Releases</A
></H2
><P
>&#13; Bugzilla 3.0 introduced the ability to automatically notify
administrators when new releases are available, based on the
<TT
CLASS="literal"
>upgrade_notification</TT
> parameter, see
<A
HREF="parameters.html"
>Section 3.1</A
>. Administrators will see these
notifications when they access the <TT
CLASS="filename"
>index.cgi</TT
>
page, i.e. generally when logging in. Bugzilla will check once per
day for new releases, unless the parameter is set to
<SPAN
CLASS="QUOTE"
>"disabled"</SPAN
>. If you are behind a proxy, you may have to set
the <TT
CLASS="literal"
>proxy_url</TT
> parameter accordingly. If the proxy
requires authentication, use the
<TT
CLASS="literal"
>http://user:pass@proxy_url/</TT
> syntax.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="nonroot.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="administration.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>UNIX (non-root) Installation Notes</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="installing-bugzilla.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Administering Bugzilla</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>