Help in upgrade, no JIRA home directory

SS September 25, 2012

Our amazon instance of JIRA crashed and all we have is JIRA 4.4.3 database.

Can I upgrade JIRA to 5.1 with just the old database and no JIRA_HOME? If yes how?

2 answers

1 accepted

0 votes
Answer accepted
SS September 28, 2012

EDIT: Answering my own question, forgot to mention that ;)

It is actually a feedback system per se(We were using SOAP protocol in our application to capture it). We didn't collect any attachments so we were good to go.

I did a little bit of experimenting ;) (with help from jira support, they didn't ask me to use the latest 4.4.x)

  • I downloaded 4.4.x latest version(4.4.5, I thought of using 5.1 directly but unsure of the after effects so just experimented with 4.4.x releases) of JIRA standalone (linux x64)
  • Extracted it
  • Created a empty JIRA_HOME
  • Edited <JIRA_INSTALL_DIR>/atlassian-jira/WEB-INF/classes/jira-application.properties to point to JIRA_HOME
  • Created a file named dbconfig.xml as described here with something like below(be sure to edit it)
    • &lt;?xml version="1.0" encoding="UTF-8"?&gt;
       
      &lt;jira-database-config&gt;
        &lt;name&gt;defaultDS&lt;/name&gt;
        &lt;delegator-name&gt;default&lt;/delegator-name&gt;
        &lt;database-type&gt;mysql&lt;/database-type&gt;
        &lt;jdbc-datasource&gt;
          &lt;url&gt;jdbc:mysql://dbserver:3306/jiradb?useUnicode=true&amp;amp;characterEncoding=UTF8&amp;amp;sessionVariables=storage_engine=InnoDB&lt;/url&gt;
          &lt;driver-class&gt;com.mysql.jdbc.Driver&lt;/driver-class&gt;
          &lt;username&gt;jiradbuser&lt;/username&gt;
          &lt;password&gt;password&lt;/password&gt;
          &lt;pool-min-size&gt;20&lt;/pool-min-size&gt;
          &lt;pool-max-size&gt;20&lt;/pool-max-size&gt;
          &lt;pool-max-wait&gt;30000&lt;/pool-max-wait&gt;
          &lt;validation-query&gt;select 1&lt;/validation-query&gt;
          &lt;min-evictable-idle-time-millis&gt;60000&lt;/min-evictable-idle-time-millis&gt;
          &lt;time-between-eviction-runs-millis&gt;300000&lt;/time-between-eviction-runs-millis&gt;
          &lt;pool-max-idle&gt;20&lt;/pool-max-idle&gt;
          &lt;pool-remove-abandoned&gt;true&lt;/pool-remove-abandoned&gt;
          &lt;pool-remove-abandoned-timeout&gt;300&lt;/pool-remove-abandoned-timeout&gt;
          &lt;pool-test-while-idle&gt;true&lt;/pool-test-while-idle&gt;
          &lt;validation-query-timeout&gt;3&lt;/validation-query-timeout&gt;
        &lt;/jdbc-datasource&gt;
      &lt;/jira-database-config&gt;
  • Once the system started up I got a few warning messages and atlassian doing some upgrade process with the database.
  • Now I took a backup of JIRA(XML backup) available in admin console
  • I downloaded JIRA 5.1.5 standalone and edited the jira-application.properties to point to a new JIRA_HOME and a empty database
  • Got it up and running with the setup wizard
  • Restored using my backed up zip file(Referred to as XML backup)
  • Now we have a JIRA 5.1 running (Yay!!)
0 votes
Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2012

Well, you're not in a happy place for sure, you have lost all attachments for starters, as well as any all plugins, I dont suppose you have an externally stored backup of JIRA_HOME? Are you sure you cant get at the disk image of the machine? I would hope you can get something out?

Attempting to leap to 5.1 is a bad idea. Setup a local JIRA 4.4.3 installation, once installed, shutdown JIRA, and restore a COPY of your prod database to the local instance. Start JIRA and stand well clear.

Once launched, reindex. I offer no guarantees but you should be able to see something.

Perhaps consider using a hosting company such that they will be responsible/accountable for future backups?

Once you have some kind of running 4.4.3 you could consider upgrading.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events