Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Under Instructions for prestaging and testing, Hyperlinks are not working

This question is in reference to Atlassian Documentation: Upgrading JIRA applications using a rapid upgrade method

Under Instructions for prestaging and testing, Hyperlinks are not working. They still point to old dead pages. 

1 answer

DISCLAIMER: Take care, this howto is not for everyone. I have done this 100's of times and know it from the top of my head. Doing it wrong and not being able to recover is not an option, i will not help you to recover if you mess it up.

 

Url's are hardcoded in the database in million places. I use linux tools for this job.

This is how i do it:

 

#dump the production database to a database dump:
mysqldump jira -ujira -pjirapassword > jira.sql
#use sed replace to change all hostnames to the new hostname of the testsystem:
cat jira.sql | sed 's/http:\/\/jira\./http:\/\/jira-testing\./g' | sed 's/https:\/\/jira\./https:\/\/jira-testing\./g' | sed 's/http:\/\/confluence\//http:\/\/confluence-testing\//g' | sed 's/https:\/\/confluence\//https:\/\/confluence-testing\//g' > new.jira.sql
#copy the new.jira.sql to the test server
#..and import it:
mysql jira -ujira -pjirapassword < new.jira.sql

 

Before you ask:

  • No, there is no great tool for this, it's all manual, hacky and smelling of man.
  • No, i don't know how to do it in windows (and doing search replace using notepad with a 2gb file isn't a great idea)
  • Yes, i include confluence hostname because links in jira-issues are hardcoded as well.
  • Yes, i include both http and https, short hostnames, FQDN, any hardcoded IP's if you find this in the database dump. Do it right at once, it might save your ass.
  • Using Crucible, Fisheye, Stash or Bamboo? Add all hostnames to those too, or make sure that they all point to localhost.
  • Using mixed short names (http://jira) and FQDN(http://jira.mycompany.com)? Replace them all?
  • Have old links that bypass your modproxy? (http://jira:8060) Replace it too...

Other useful tips:

  • Depending on how many applications you have in your stack, will depend on how many search replaces you will have to do.
  • I recommend you to go through the dump manually before restoring it looking for your companies top level domain to make sure it will not cause havoc on other systems (like mysql databases sources, triggering builds)
  • make sure to update the hostname/database name in dbconfig.xml. 2 JIRA instances talking to the database takes HOURS to manually recover from. I can not stretch this point enough.
  • make sure to suppress notification emails in your setenv.sh before starting the server up
  • make sure to route external servers that JIRA might talk to using iptable rules, or the hostfile. For example, to make sure the test server doesn't talk to a production database, it makes sense adding "dbserver.yourcompany.com dbserver.yourcompany dbserver" to 127.0.0.1 and ::1

 

Good luck!

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you