Table of Contents

,

Migrate Jira to new server

Setup mysql

 wget https://dev.mysql.com/get/mysql-apt-config_0.8.11-1_all.deb
 dpkg -i mysql-apt-config_0.8.11-1_all.deb

Create jira user:

 CREATE USER 'jiradbuser'@'localhost' IDENTIFIED BY '<password>';
 GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on jiradb.* TO 'jiradbuser'@'localhost' IDENTIFIED BY '<password>';
 FLUSH PRIVILEGES;

Make sure above matches in /var/atlassian/application-data/jira/dbconfig.xml.

Zip up jira data directory and make database backup

 tar cjvf jira_install_dir_$(date +%F).tar.bz2 /opt/atlassian/jira/
 mysqldump -u jiradbuser -p --databases jiradb > jira.sql

On new server unpack the jira data dir and restore DB:

 mysql -uroot -p evojira < jira.sql
 tar vxf evojira_2018_12_07_1417.tar.gz -C /

Install apache and enable apache modules

 apt install apache2
 a2enmod rewrite ssl proxy proxy_http

Enable ssl. See Jira ssl apache2 configuration

Install jira and mysql connector

 wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-7.3.5-x64.bin
 wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.41.zip

Run installation

 ./atlassian-jira-software-7.3.5-x64.bin

Copy java connector plugin

 apt install unzip
 unzip mysql-connector-java-5.1.41.zip -d .
 cp mysql-connector-java-5.1.41-bin.jar /opt/atlassian/jira/lib

Start jira

 /etc/init.d/jira start