<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>3.11.1. Upgrading with Git — Bugzilla 5.0.4 documentation</title> <link rel="stylesheet" href="../_static/bugzilla.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '5.0.4', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <link rel="shortcut icon" href="../_static/favicon.ico"/> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="3.11.2. Migrating from Bazaar" href="migrating-from-bzr.html" /> <link rel="prev" title="3.11. Upgrading" href="upgrading.html" /> </head> <body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="migrating-from-bzr.html" title="3.11.2. Migrating from Bazaar" accesskey="N">next</a></li> <li class="right" > <a href="upgrading.html" title="3.11. Upgrading" accesskey="P">previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Bugzilla 5.0.4 documentation</a> »</li> <li class="nav-item nav-item-1"><a href="index.html" >3. Installation and Maintenance Guide</a> »</li> <li class="nav-item nav-item-2"><a href="upgrading.html" accesskey="U">3.11. Upgrading</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="upgrading-with-git"> <span id="id1"></span><h1>3.11.1. Upgrading with Git<a class="headerlink" href="#upgrading-with-git" title="Permalink to this headline">¶</a></h1> <p>Upgrading to new Bugzilla releases is very simple, and you can upgrade from any version to any later version in one go - there is no need for intermediate steps. There is a script named <code class="file docutils literal"><span class="pre">checksetup.pl</span></code> included with Bugzilla that will automatically do all of the database migration for you.</p> <p>Bugzilla is now hosted on Github, but we used to be hosted on git.mozilla.org. If you got the code from git.mozilla.org, you need to point your checkout at Github instead. To find out, run:</p> <p><strong class="command">git remote -v</strong></p> <p>If you see "git.mozilla.org" anywhere in the output, then run:</p> <p><strong class="command">git remote set-url origin https://github.com/bugzilla/bugzilla</strong></p> <p>This change will only ever need to be done once.</p> <div class="section" id="before-you-upgrade"> <h2>3.11.1.1. Before You Upgrade<a class="headerlink" href="#before-you-upgrade" title="Permalink to this headline">¶</a></h2> <p>Before you start your upgrade, there are a few important steps to take:</p> <ol class="arabic simple"> <li>Read the <a class="reference external" href="http://www.bugzilla.org/releases/">Release Notes</a> of the version you're upgrading to and all intermediate versions, particularly the "Notes for Upgraders" sections, if present. They may make you aware of additional considerations.</li> <li>Run the <a class="reference internal" href="sanity-check.html#sanity-check"><span class="std std-ref">Sanity Check</span></a> on your installation. Attempt to fix all warnings that the page produces before you start, or it's possible that you may experience problems during your upgrade.</li> <li>Work out how to <a class="reference internal" href="backups.html#backups"><span class="std std-ref">back up</span></a> your Bugzilla entirely, and how to restore from a backup if need be.</li> </ol> <div class="section" id="customized-bugzilla"> <h3>Customized Bugzilla?<a class="headerlink" href="#customized-bugzilla" title="Permalink to this headline">¶</a></h3> <p>If you have modified the code or templates of your Bugzilla, then upgrading requires a bit more thought and effort than the simple process below. See <a class="reference internal" href="../integrating/templates.html#template-method"><span class="std std-ref">Choosing a Customization Method</span></a> for a discussion of the various methods of code customization that may have been used.</p> <p>The larger the jump you are trying to make, the more difficult it is going to be to upgrade if you have made local code customizations. Upgrading from 4.2 to 4.2.1 should be fairly painless even if you are heavily customized, but going from 2.18 to 4.2 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> <p>If you have made customizations, you should do the upgrade on a test system with the same configuration and make sure all your customizations still work. If not, port and test them so you have them ready to reapply once you do the upgrade for real.</p> <p>You can see if you have local code customizations using:</p> <p><strong class="command">git diff</strong></p> <p>If that comes up empty, then run:</p> <p><strong class="command">git log | head</strong></p> <p>and see if the last commit looks like one made by the Bugzilla team, or by you. If it looks like it was made by us, then you have made no local code customizations.</p> </div> </div> <div class="section" id="starting-the-upgrade"> <span id="start-upgrade-git"></span><h2>3.11.1.2. Starting the Upgrade<a class="headerlink" href="#starting-the-upgrade" title="Permalink to this headline">¶</a></h2> <p>When you are ready to go:</p> <ol class="arabic simple"> <li>Shut down your Bugzilla installation by putting some explanatory text in the <span class="param">shutdownhtml</span> parameter.</li> <li>Make all necessary <a class="reference internal" href="backups.html#backups"><span class="std std-ref">backups</span></a>. <em>THIS IS VERY IMPORTANT</em>. If anything goes wrong during the upgrade, having a backup allows you to roll back to a known good state.</li> </ol> </div> <div class="section" id="getting-the-new-bugzilla"> <span id="upgrade-files-git"></span><h2>3.11.1.3. Getting The New Bugzilla<a class="headerlink" href="#getting-the-new-bugzilla" title="Permalink to this headline">¶</a></h2> <p>In the commands below, <code class="docutils literal"><span class="pre">$BUGZILLA_HOME</span></code> represents the directory in which Bugzilla is installed. Assuming you followed the installation instructions and your Bugzilla is a checkout of a stable branch, you can get the latest point release of your current version by simply doing:</p> <p><strong class="command">cd $BUGZILLA_HOME</strong></p> <p><strong class="command">git pull</strong></p> <p>If you want to upgrade to a newer release of Bugzilla, then you will additionally need to do:</p> <p><strong class="command">git checkout release-X.X-stable</strong></p> <p>where "X.X" is the 2-digit version number of the stable version you want to upgrade to (e.g. "4.4").</p> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Do not attempt to downgrade Bugzilla this way - it won't work.</p> </div> <p>If you have local code customizations, git will attempt to merge them. If it fails, then you should implement the plan you came up with when you detected these customizations in the step above, before you started the upgrade.</p> </div> <div class="section" id="upgrading-the-database"> <h2>3.11.1.4. Upgrading the Database<a class="headerlink" href="#upgrading-the-database" title="Permalink to this headline">¶</a></h2> <p>Run <code class="file docutils literal"><span class="pre">checksetup.pl</span></code>. This will do everything required to convert your existing database and settings to the new version.</p> <p><strong class="command">cd $BUGZILLA_HOME</strong></p> <p><strong class="command">./checksetup.pl</strong></p> <blockquote> <div><div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">For some upgrades, running <code class="file docutils literal"><span class="pre">checksetup.pl</span></code> on a large installation (75,000 or more bugs) can take a long time, possibly several hours, if e.g. indexes need to be rebuilt. If this length of downtime would be a problem for you, you can determine timings for your particular situation by doing a test upgrade on a development server with the production data.</p> </div> </div></blockquote> <p><code class="file docutils literal"><span class="pre">checksetup.pl</span></code> may also tell you that you need some additional Perl modules, or newer versions of the ones you have. You will need to install these, either system-wide or using the <code class="file docutils literal"><span class="pre">install-module.pl</span></code> script that <code class="file docutils literal"><span class="pre">checksetup.pl</span></code> recommends.</p> </div> <div class="section" id="finishing-the-upgrade"> <h2>3.11.1.5. Finishing The Upgrade<a class="headerlink" href="#finishing-the-upgrade" title="Permalink to this headline">¶</a></h2> <ol class="arabic simple"> <li>Reactivate Bugzilla by clear the text that you put into the <span class="param">shutdownhtml</span> parameter.</li> <li>Run another <a class="reference internal" href="sanity-check.html#sanity-check"><span class="std std-ref">Sanity Check</span></a> on your upgraded Bugzilla. It is recommended that you fix any problems you see immediately. Failure to do this may mean that Bugzilla may not work entirely correctly.</li> </ol> <hr class="docutils" /> <p>This documentation undoubtedly has bugs; if you find some, please file them <a class="reference external" href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla&component=Documentation">here</a>.</p> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="../index.html"> <img class="logo" src="../_static/bugzilla.png" alt="Logo"/> </a></p> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">3.11.1. Upgrading with Git</a><ul> <li><a class="reference internal" href="#before-you-upgrade">3.11.1.1. Before You Upgrade</a><ul> <li><a class="reference internal" href="#customized-bugzilla">Customized Bugzilla?</a></li> </ul> </li> <li><a class="reference internal" href="#starting-the-upgrade">3.11.1.2. Starting the Upgrade</a></li> <li><a class="reference internal" href="#getting-the-new-bugzilla">3.11.1.3. Getting The New Bugzilla</a></li> <li><a class="reference internal" href="#upgrading-the-database">3.11.1.4. Upgrading the Database</a></li> <li><a class="reference internal" href="#finishing-the-upgrade">3.11.1.5. Finishing The Upgrade</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="upgrading.html" title="previous chapter">3.11. Upgrading</a></p> <h4>Next topic</h4> <p class="topless"><a href="migrating-from-bzr.html" title="next chapter">3.11.2. Migrating from Bazaar</a></p> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="migrating-from-bzr.html" title="3.11.2. Migrating from Bazaar" >next</a></li> <li class="right" > <a href="upgrading.html" title="3.11. Upgrading" >previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Bugzilla 5.0.4 documentation</a> »</li> <li class="nav-item nav-item-1"><a href="index.html" >3. Installation and Maintenance Guide</a> »</li> <li class="nav-item nav-item-2"><a href="upgrading.html" >3.11. Upgrading</a> »</li> </ul> </div> <div class="footer" role="contentinfo"> Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6. </div> </body> </html>