How to upgrade Virtual Bugzilla Server from version 2.0 to version 2.1

Upgrade from VBS 2.0 to VBS 2.1 is not much different from other VBS upgrades. It boils down to:

This upgrade guide is not as thorough as instructions for upgrading VBS 1.2 to 2.x, to which you can refer if you get lost in the process.

  1. Install VBS 2.1 into a separate folder

    Do not overwrite old VBS! If you are upgrading VBS with Testopia, don't forget to install Testopia add-on on VBS 2.1.

  2. Start old and new Bugzilla servers

    Use VMWare Player or Workstation to open and start both old VBS and new VBS. When new VBS starts, write down its IP address, which is shown in Bugzilla URL.

  3. Login to the old VBS using 'bugzilla' account

    Use console, shown in the VMWare window, or a SSH client. The password is 'bugzilla', unless it has been changed.

  4. Make sure old VBS is not accessible

    If the old VBS is accessible while you are migrating data from it, someone may make changes which will be lost or will get in the way.

    The easiest way is to stop Apache web server:

    su - root -c "apache2 -k stop"
    when asked for a password, type 'root'
  5. Back up MySQL database

    Database dump contains all user data from Bugzilla. To create it, use mysqldump utility:

    mysqldump -uroot -proot --add-drop-table --disable-keys bugs >/tmp/bugs.sql

    If using Testopia:

    mysqldump -uroot -proot --add-drop-table --disable-keys testopia >/tmp/testopia.sql
  6. Create backup of local Bugzilla configuration

    Use the following commands:

    cd /home/bugzilla
    tar cf /tmp/bugzilla-data.tar --exclude=data/template localconfig data

    If using Testopia:

    cd /testopia
    tar cf /tmp/testopia-data.tar --exclude=data/template localconfig data
  7. Create backup of your custom config files

    If you have customized Virtual Bugzilla Server somehow, create a tar archive with your custom configuration files. You will then unpack and apply them on the new server.

  8. Transfer backup files to the new VBS

    Use command:

    cd /tmp
    scp *.sql *.tar bugzilla@new.VBS.IP.address:/tmp

    When asked about authenticity, enter yes.
    When asked for password, enter bugzilla — the default password for bugzilla account on the new VBS.

  9. Login to the new VBS

    Use account bugzilla/bugzilla. You can login on console or use SSH client.

  10. Verify that backup files have been transferred

    cd /tmp
    ls -l *.sql *.tar
  11. Drop and create mysql database

    mysql -uroot -proot -e 'drop database bugs'
    mysql -uroot -proot -e 'create database bugs character set utf8'

    If importing Testopia, use the same commands to recreate database testopia.

  12. Import data into mysql database

    Command: mysql -uroot -proot bugs <bugs.sql

    For testopia: mysql -uroot -proot testopia <testopia.sql

  13. Unpack bugzilla configuration files

    cd /bugzilla
    tar xf /tmp/bugzilla-data.tar

    For Testopia:

    cd /testopia
    tar xf /tmp/testopia-data.tar

    It's probable that you will see warnings about time stamps — ignore them.

  14. (Optionally) Edit localconfig

    You probably need to change database access parameters in localconfig file: db_name, db_user and db_pass.

    Use joe localconfig to launch file editor and make arbitrary changes.

  15. Run checksetup.pl

    Run checksetup.pl, the Bugzilla's installation and upgrade uberscript.

    cd /bugzilla
    ./checksetup.pl

    For Testopia:

    cd /testopia
    ./checksetup.pl
  16. Change urlbase parameter

    At last, you need to change the urlbase parameter in data/params file.

    If your old VBS is still using numerical URL (with IP address), you can try to run this command: /vbs/update-bugzilla-urlbase.sh:

    Otherwise, edit data/params manually.

  17. Move other configuration files that you have changed on the old VBS

    Other configuration files, like Apache and MySQL setup may be moved in the same way.

  18. Done!

    This is it. If there were no errors during the upgrade, you should now be able to access new Bugzilla (Testopia) with your old data and settings.

A few things to do after the upgrade

If something went wrong

Copyright (C) ALM Works, 2007