Theresa Arzadon-Labajo

Migrating RT 3.6.4 to RT 4.0

Posted by Theresa Arzadon-Labajo (tarzadon) on Oct 12 2011
Tech Stuff >> Unix-Linux
Instead of upgrading our existing RT installation,  I wanted to create a whole new instance on a new server, since our RT3 installation was on an older architecture.

1.  Create a new machine.  I created ours in a KVM environment.
2.  On the new machine
      a.  Download the RT tar ball from:
The latest release can be downloaded from:
      b.  Install the required packages in the README file.
            1)  This is what I installed: httpd, gcc, mysql, mysql-server, perl-CPAN, mod_perl, make, perl-XML-Parser, perl-YAML
            2) Configure CPAN if not done already:
# perl -MCPAN -e shell
      c.  Follow the General  Installation instructions in the README file.
# tar xzvf rt-4.0.0.tar.gz
# ./configure
# make testdeps
# make fixdeps
# make install   (We will follow 6a in README because were are creating a fresh install, but then will also be doing parts of 6b for upgrading the database)

     d.  If you are using iptables, make sure things look okay.  If mysqld is not running, turn it on.  If you plan on using SSL, make sure you have the certificates.
     e.  From your RT3 installation, copy your customizations from into RT4's  These are the things that I added:
Set( $rtname, '');
Set($Organization , "");
Set($RTAddressRegexp , '^your-rt-user\$');
Set($CorrespondAddress , '');
Set($CommentAddress , '');
Set($WebPort , 443);# + ($< * 7274) % 32766 + ($< && 1024));
Set($WebBaseURL , "$WebPort");
Set($DatabaseUser , 'your-rt-user');
Set($DatabasePassword , 'your-rt-databasepw');
Set($DatabaseName , 'your-rt4-database');
#Set($DatabaseName , 'your-rt3-database');

     f.  On the new machine, Initialize new database so you have a clean RT4 install of the database
#  make initialize-database

     g.  Dump the RT3 database on the old server. Copy the database file to the new server
#  mysqldump --default-character-set=binary rt3-database -p > rt3-database.sql
#  scp rt3-database.sql user@rt4server:

     h.  Import the RT3 database into your new server.  Make sure the database name is different than the one you used to initialize the RT4 database.
# mysql rt3-database < /path/rt3-database.sql

     i.  From the UPGRADING.sql page, generate the SQL queries and apply it to your database :
# perl /path-to-rt-install/rt-4.0.0/etc/upgrade/ rt3-database dbuser dbpassword  > /path/queries.sql
# mysql rt3-database < /path/queries.sql

     j.  From 6b in README,  I looked in the make file and just ran the command pertaining to upgrading the database.  I don't need to upgrade the files because I created a new RT4 installation.
# sbin/rt-setup-database --dba root --prompt-for-dba-password --action upgrade

     k.  Now, the database will work with the RT4 installation.   You have an option to just change the database name in to the database you just imported, or you can dump the RT3 upgraded database and import it into the RT4 database that was newly created.  I chose to do the latter.
#  mysqldump --default-character-set=binary rt4-database -p > /path/rt4database-orig.sql
#  mysqldump --default-character-set=binary rt3-database -p > /path/rt3database-upgradetort4.sql
#  mysql rt4-database < /path/rt3database-upgradetort4.sql

     l.  Consult docs/web_deployment.pod for the apache configuration.  I copied my conf files from the old server and compared it with the documentation to make sure everything was correct.

     m.  Restart mysqld and httpd.  Access your site from a browser to verify it looks ok.  I had to turn off SELinux to get it to work, but I'm sure it will be a quick fix.

     n.  Update your aliases file so that it points to your new rt-server.  If you are using a remote mail server, make sure to copy over the new rt-mailgate


Last changed: Feb 27 2020 at 4:06 PM