This has been documented while upgrading Request Tracker 3.6 from Debian Lenny to Request Tracker 3.8 from Lenny-Backports, but most of it should also work for upgrades from Debian Lenny to Squeeze.
* Make a backup of your RT database in case it's your live system.
* Install request-tracker3.8 and the database-backend you use (e.g. rt3.8-db-mysql).
* This may fail depending on the DB setup. No problem though.
* Edit /etc/request-tracker3.**8**/RT_SiteConfig.pm to look like /etc/request-tracker3.**6**/RT_SiteConfig.pm, especially with regards to usernames and passwords.
* If the configuration of the Debian package failed as mentioned above, run now `dpkg --configure --pending`
* Run `update-alternatives --config rt`
* Edit /etc/request-tracker3.**8**/apache2-modperl2.conf to look like /etc/request-tracker3.**6**/apache2-modperl2.conf in case you made changes to that file. If not, just keep the defaults.
* Look for the place under /etc/apache2/sites-available where /etc/request-tracker3.**6**/apache2-modperl2.conf was included and change it to /etc/request-tracker3.**8**/apache2-modperl2.conf
* Run `apache2ctl configtest` and if that works fine, then try to start the Apache again. Shut it down again if it came up. If not, look in the Apache error log for the reason and fix it. :-)
* Run `/usr/sbin/rt-setup-database-3.8 --action upgrade --dba root --prompt-for-dba-password`
* Enter 3.6.7 as version to upgrade from as the Debian packages have the package version 3.6.7-5+lenny4
* It worked fine for me without entering a version to stop at 3.7.87 as recommended in `/usr/share/doc/request-tracker3.8/UPGRADING.mysql`
* Ignore warnings about the "RTAddressRegexp option" for now.
* Run `/usr/share/request-tracker3.8/etc/upgrade/upgrade-mysql-schema.pl $databasename $databaseadministrator $databaseadministratorpassword > rt-upgrade-queries.sql`. In our case, $databasename is "rtdb" and $databaseadministrator is "root". You may need to quote your password.
* Look through the generated file if it looks sane.
* Run `mysql -u $databaseadministrator -p$databaseadministratorpassword $databasename < rt-upgrade-queries.sql` You may need to quote your password. Notice that there's no blank between "-p" and the password.
* Start anything you stopped at the beginning.
* Start MTA
* Start Apache
At least the clone of our server with RT 3.6 worked afterwards with RT 3.8