Upgrade Bugzilla installation

I recently had to upgrade a Bugzilla installation in a very restrictive environment. These are the steps I used to upgrade the installation in case I decide to do it again…

p.p.p → previous
n.n.n → next

Current Setup

The Bugzilla installation is on it own file system mounted under the /var directory.

/var
 |
 +-- bugzilla
     |
     +-- bugzilla-p.p.p
     |
     +-- bugzilla-n.n.n
     |
     +-- current -> bugzilla-p.p.p
     |
     +-- data
     |
     +-- lost+found

Upgrade Installation

cd /var/bugzilla
sudo mysqldump --opt -u bugs -p bugs > bugs-p.p.p.sql
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-x.x.x.tar.gz
sudo cp -r bugzilla-p.p.p bugzilla-n.n.n
sudo tar xzvf bugzilla-n.n.n.tar.gz
sudo cp bugzilla-p.p.p/localconfig bugzilla-n.n.n/
sudo cp -r bugzilla-p.p.p/data bugzilla-n.n.n/
sudo bugzilla-n.n.n/checksetup.pl
rm bugzilla-x.x.x.tar.gz
sudo rm current
sudo ln -s bugzilla-n.n.n current

After the applications runs for a while (depending on how active the installation is), execute:

sudo rm bugs-p.p.p.sql
sudo rm -Rf bugzilla-p.p.p