Install blank new RT5

Dear all professional,

Is it possible to install a blank new RT5 and restore the RT4.4.4 db (MySql 5.7.22) into it?

Thanks,
Clement

I would recommend you to install a blank RT 4.4.4, install the database there and then upgrade to RT5. The database tables are in principle upgraded as part of the RT version upgrade. I say ā€œin principleā€ because thereā€™s a wealth of things that can go wrong in the upgrade procedure. Iā€™ve experienced so many failures that Iā€™ve set up a separate Makefile for installation and upgrade. After about 50+ reinstallations from scratch, I got the blank install to work. After further improvements to the Makefile and another 50+ reinstallations, I got even the blank installation+upgrade to work.

1 Like

I would do the following:

  1. Get a copy of the RT 4 database: ( mysqldump --default-character-set=utf8mb4 rt5 --tables sessions --no-data --single-transaction; \ mysqldump --default-character-set=utf8mb4 rt5 --ignore-table rt5.sessions --single-transaction ) \ | gzip > rt-date +%Y%m%d.sql.gz

  2. Install RT 5

  3. Create a blank RT 5 database: sbin/rt-setup-database --action create,acl

  4. Restore the RT 4 database:

gunzip -c rt-20141014.sql.gz | mysql -uroot -p rt5
  1. Run the upgrade scripts on the restored db

docs:
https://docs.bestpractical.com/rt/5.0.1/system_administration/database.html#MySQL-and-MariaDB

Agree with rtshouldberewritten, RT is getting crankier and crankier as time goes by. If this shoddy behavior keeps up, I fear it will fall behind the other ticketing systems.

Odd, because in moving from 4.4.3 to 5.0.0 (and then 5.0.1) we found things worked pretty well here (on a fairly large, heavily customised RT).

Imported the old database to RT5, and run ā€œmake upgrade-databaseā€ then appeared below error, anyone know how to fix this.

Processing 4.5.0
Now populating database schema.
[8186] [Mon Jun 28 09:31:03 2021] [critical]: DBD::mysql::st execute failed: Canā€™t DROP ā€˜HotListā€™; check that column/key exists at /download/rt-5.0.1/sbin/ā€¦/lib/RT/Handle.pm line 551. (/download/rt-5.0.1/sbin/ā€¦/lib/RT.pm:409)
DBD::mysql::st execute failed: Canā€™t DROP ā€˜HotListā€™; check that column/key exists at /download/rt-5.0.1/sbin/ā€¦/lib/RT/Handle.pm line 551.
make: *** [upgrade-database] Error 9

I few people ran into the same issue, you can just skip the 4.5.0 upgrade step since the table it drops doesnā€™t exist

Thanks case resolved.