Upgrade and config files

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
mnemonicator
Posts: 17
Joined: 28 May 2018, 13:56

Upgrade and config files

Post by mnemonicator »

Hello colleagues, i have a few questions regarding upgrade process.

i have 2.12 version and trying to upgrade to 2.24.2

i have web root here /var/www/html
My mantis 2.12 site stored here /var/www/html/mantis

Is it important to place new version to this folder - /var/www/html/mantis/mantis-new or not?

2nd question, i see that before i will start upgrade from the mantis-new/admin/install.php page i also need to copy config_inc.php file to new version. When i copy it, i see that some resources can't load, for example: dropzone-5.5.0.min.css, bootstrap-3.4.1.min.css

so, is it really important to copy config files and modules before upgrade?

thank you.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Upgrade and config files

Post by cas »

Question 1: NO
Question 2:
Make sure you have a backup of your mantis directory and mantis database
Simply copy the new version over the old one and run the the install script
http://your mantis site/admin/install.php
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Upgrade and config files

Post by atrol »

cas wrote: 21 Sep 2020, 13:07 Simply copy the new version over the old one
Pretty quick and dirty.
After that, your installation contains old files that are not used any longer.
In worst case, those old files contain unsecure code and could be used to attack the system.
Please use Search before posting and read the Manual
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Upgrade and config files

Post by cas »

You are right that this is a risk.
However most people do not want the new version to be in another place, they want it to be in the same place.
If you simply copy config_inc.php into a new installation, any defined paths in that file will lead to issues in the new installation.
So i would be in favor of using my "quick & dirty" method. One extra step should be included in the upgrade process which is the removal of any "old" scripts.
This would make the update process much easier and also faster since there is no need to copy all attachments/plugins etcetera :mrgreen:
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Upgrade and config files

Post by atrol »

cas wrote: 22 Sep 2020, 08:14 However most people do not want the new version to be in another place, they want it to be in the same place.
Right, that's why the Amin Guide tells as a post upgrade task to move the old mantis version and to move the new mantis version https://mantisbt.org/docs/master/en-US/ ... ostupgrade
cas wrote: 22 Sep 2020, 08:14 If you simply copy config_inc.php into a new installation, any defined paths in that file will lead to issues in the new installation.
Is there a need to hardcode absolute paths in config_inc.php?
Please use Search before posting and read the Manual
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Upgrade and config files

Post by cas »

This post-upgrade task can be quite time consuming with the attachments on disk. One of my installations had 40.000 files.
There should be no need, I agree but the one I am thinking off if "g_path" and "core_path" but that should not be the biggest worry.
I have found that in cases where people have issues with the official upgrade process, the "quick & dirty" methods get them back on track.
If the upgrade process would take care of no longer needed files, the upgrade process would be come more easy in my view.
mnemonicator
Posts: 17
Joined: 28 May 2018, 13:56

Re: Upgrade and config files

Post by mnemonicator »

Thank you colleagues, i understand the process now.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Upgrade and config files

Post by atrol »

@cas I understand your points, but IMO there is a big advantage in keeping it as it is:
You can try the new version without any rush and test if everything is ok (run admin/check, test manually, adjust plugins, ...), in best case even parallel to your current version.
e.g. we had no database schema changes for quite a long time, so you could run any 1.3.x and 2.x versions at the same time connected to the same database.

Of course, it would be nice to have more than one option to upgrade, but as you know: Not enough contributors to get everything what our users want ...
Please use Search before posting and read the Manual
Post Reply