How to upgrade Virtual Bugzilla Server from version 1.x to version 2.x
Virtual Bugzilla Server 2.0 is a completely rebuilt product. Briefly, upgrading from previous versions boils down to:
- Install VBS 2.0 in a new directory and start it;
- Back up files on the old version of VBS;
- Transfer files to the new VBS;
- Use backup files to restore database and configuration on the new VBS.
This how-to explains the upgrade process in detail. By default, we assume that you are upgrading from version 1.2. When actions are different for VBS 1.0 and 1.1, there are special notes.
Install VBS 2.0 into a separate folder
Do not overwrite old VBS!
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.
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.
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.

Verify that your current directory is /home/bugzilla
Use pwd command.

Create database dump
Database dump contains all user data from Bugzilla. To create it, use mysqldump utility:
VBS 1.2: mysqldump -uroot -pmysql --add-drop-table --disable-keys bugs >bugs.sql VBS 1.0, 1.1: mysqldump -uroot -pmysql --add-drop-table --disable-keys bugz220 >bugs.sql 
"mysql" is the default mysql root password and may have changed.
Create backup of local Bugzilla configuration
Use the following commands:
cd bugzilla (on VBS 1.0 and 1.1: cd bugz220)
tar cf ../bugzilla-data.tar --exclude=data/template localconfig data
cd ..
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.
Transfer backup files to the new VBS
Use command: scp bugs.sql bugzilla-data.tar bugzilla@ new.VBS.IP.address:

When asked about authenticity, enter yes.
When asked for password, enter bugzilla — the default password for bugzilla account on the new VBS.Login to the new VBS
Use account bugzilla/bugzilla. You can login on console or use SSH client.
Verify that backup files have been transferred
ls -l bugs.sql bugzilla-data.tar

Drop and create mysql database
You need to drop and create again mysql database bugs:
mysql Цuroot Цproot Цe 'drop database bugs'
mysql Цuroot Цproot Цe 'create database bugs character set utf8'VBS 1.0 and 1.1: Use character set that has been used on your old mysql database. This is important if you have non-Latin characters in bugs.

Import data into mysql database
Command: mysql -uroot -proot bugs <bugs.sql

Unpack bugzilla configuration files
Command: tar xf bugzilla-data.tar
It's probable that you will see warnings about time stamps — ignore them.

(Optionally) Edit localconfig
You probably need to change database access parameters in localconfig file: db_name, db_user and db_pass. You definitely need to change them if you are upgrading from VBS 1.0 or 1.1.
To quickly change database access parameters from bugz220 to bugs, you can use command sed -i 's/bugz220/bugs/' localconfig. Use joe localconfig to launch file editor and make arbitrary changes.
(Optionally) Recode database
If you are migrating from database not in UTF-8 charset, you need to re-code the database. Use this command:
contrib/recode.pl --charset= original_database_charsetRun checksetup.pl
Run checksetup.pl, the Bugzilla's installation and upgrade uberscript.

At some point, the script will ask you to confirm database conversion. Press ENTER to continue. Don't worry about the warning, you still have your old VBS as a backup.

When checksetup.pl finishes, the screen should look like this:

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.
Congratulations!
This is it. If there were no errors during the upgrade, you should now be able to access new Bugzilla with your data.
A few things to do after the upgrade
- Check that e-mail sending works. If necessary, tweak Bugzilla configuration;
- If you were using national characters, make sure they are displayed correctly in the new VBS. If needed, turn on "utf8" option in "Parameters" section of Bugzilla configuration;
- Back up your new VBS.
If something went wrong
- Try once more;
- Ask for help at our community forums.

