Changing base directory after installation?

Hi all,

In short: how can I tell an installed instance of RT that it now has a new base directory? Here’s the full story.

I’m using RT 4.4.1 on Debian 8. I just duplicated my instance, to make a test version I can play with without touching the production one I’ve had running for some months. I copied the database, everything in /opt/rt4, and set up a new server block.

The problem now is that RT is still loading my production instance’s configuration files, fonts, and other resources, because somewhere deep inside itself, it still thinks it’s in /opt/rt4. In reality, my test instance lives in /opt/rt4_test, but I don’t know how to tell it that. I’d rather not re-install everything, as we have a lot of modifications. Plus, I had a hard time installing the first (production) instance, and I don’t want to accidentally override anything while trying to get this test instance to work. Is there any way to redefine the base directory so that my test instance will work correctly? Thanks for any ideas!

I wanted to update with what I’ve been trying. I’m still stuck, though.

I was looking through the system configuration page and saw $BasePath, which sent me searching the web, which led me to RT.pm. I found where it’s defined, and it looks like $INC is the key. Unfortunately, this looks like it should work, as it appears to grab the path of RT.pm when RT runs. I could be wrong, though, as I’m no Perl expert at all. Still, I can’t redefine it because it’s not hard-coded. Am I on the right track at all with this line of investigation?

If you grep the tree for /opt/rt4 I believe that should be a complete list of places you need to change inside the RT codebase.

You will also need to adjust your apache, cron, mail, etc. config to use the new directory.

Thanks. I’m curious, then, why $BasePath exists? If the directory specified during install is then hard-coded in places, what is $BasePath for?