Hello All!
I have been using RT4 for quite a few years now. We had an issue with the host it was running on, but lucky for us we had a full backup of the database and of the rt4 directory. I am in the process of getting it back online.
My question is, how can I find the exact version number of the file structure and of the database? Is there a database entry that tells me what version? Is there a file somewhere in the directory that also says what version it is? I just need to make sure they are the same.
It would be very strange for the DB to somehow be out of sync with the code. If anything, it would be more likely someone might run a code update and not run the DB part.
There is no single RT version value stored in the DB, but after you restore you can check the “RT upgrade history” on the page at Admin > Tools > System Configuration.
I think that would be sometime very useful to have this information inside the database. For example when you run rt inside a k8s and need to known (automatically) if the deployment need or not to run a upgrade…
Where RT store those history ? I didn’t find it in the database, but they are present on the webui.
Thanks
select content from attributes where name = 'UpgradeHistory';
This seems to be manipulated in /opt/rt5/lib/RT/System.pm, so you may need code to decode it.
Alternatively you can use a perl one-liner:
perl -I/opt/rt5/lib -MRT -e'print $RT::VERSION';
I can’t see any reason why there couldn’t be a matching record in the attributes table. It looks as though a simple scalar value is stored verbatim, eg DefaultDashboard (3 in my system), whereas everything else is serialized using Storable (probably).
You can write a script based on the boilerplate used in other scripts and use the GetAttribute and SetAttribute methods to create a new attribute that exposes the version number directly in the database.
Sorry that’s not a full solution but I hope it may spark an idea for you.
I’m now in the process of restoring it using a full backup of both the database and the RT4 directory. My concern is ensuring that the file structure and the database are from the same version of RT4. Is there a specific file in the directory that indicates the version number, or is there a database entry where I can check this information?