Upgrade JIRA from shell

Update steps:
- Check your license. On my.atlassion.com check your licenses. Make sure all are active (press renew button when you see this).

Now login to JIRA and:
- Go to Addons
- Update Atlassian Universal Plugin Manager Plugin
- Update all third-party plugins
- Re-Indexing JIRA DB

Run and review: JIRA update check

# Note: you can ignore incompatible error related to: Atlassian Universal Plugin Manager Plugin. This plugin will be shipped with the JIRA update so will work fine.

# Stop JIRA instance
sudo /etc/init.d/jira stop

- Backup folders:
/opt/atlassian
/home/jira
/var/atlassian

# Backup these files especially, we need to restore or alter later:
/opt/atlassian/jira/conf/server.xml
/var/atlassian/application-data/jira/dbconfig.xml

- Backup MySQL database:
mysqldump -Q --add-drop-table DBname -uDBuser -pDBpassword >/root/jira-backup-db.sql

# Download new JIRA version:
cd /root
wget "https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-8.0.2-x64.bin"
chmod +x atlassian-jira-software-8.0.2-x64.bin
# open screen so if connection drops the upgrade still continues:
Type: screen
# If you haven't got this library install it by running: yum install screen (CENTOS) or apt-get install screen (DEBIAN)

# Run upgrade
./atlassian-jira-software-8.0.2-x64.bin
Press enter
Choose: Upgrade an existing JIRA installation

[root@jira ~]# ./atlassian-jira-software-8.0.2-x64.bin
Unpacking JRE ...
Starting Installer ...

This will install JIRA Software 8.0.2 on your computer.
OK [o, Enter], Cancel [c]

Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2], Upgrade an existing JIRA installation [3, Enter]
3
Existing installation directory:
[/opt/atlassian/jira]
Back up JIRA home directory
The upgrade process will automatically back up your JIRA installation
directory. You can also choose to back up your existing JIRA home directory.
Both directories are backed up as zip archive files in their respective
parent directory locations.

We strongly recommend choosing this option in the unlikely event that you
experience problems with the upgrade and may require these backups to
restore your existing JIRA installation.

If you have many attachments in your JIRA home directory, the zip archive of
this directory may consume a significant amount of disk space.
Back up JIRA home directory?
Yes [y], No [n, Enter]
y


Checking for local modifications.

List of modifications made within JIRA directories.

The following provides a list of file modifications within the
atlassian-jira directory.

Modified files:
        atlassian-jira/robots.txt
        bin/setenv.sh
        conf/server.xml
Removed files:
        (none)
Added files:
        (none)

[Enter]

Checking if your instance of JIRA Software is running
Upgrade checklist
Complete these steps to have a smooth upgrade experience. If you need more
details, see
https://docs.atlassian.com/jira/jadm-docs-080/Preparing+for+the+upgrade.

1. Run a Jira health check
Run a Jira health check to verify that you're ready to upgrade. Make sure
that checks related to the license and database have passed, but you can
also fix other detected problems.

2. Check app compatibility
Make sure your apps are compatible with the Jira version you're upgrading
to. Disable all incompatible apps, so they don't affect your upgrade.

3. Back up the database
Back up the Jira database using your database's native backup tools.

Have you completed all these steps?
Yes [y], No [n, Enter]
y
Your existing JIRA installation is about to be upgraded! Do you want to proceed?
Upgrade [u, Enter], Exit [e]
u

Your instance of JIRA is currently being upgraded.
Checking if JIRA has been shutdown...
Backing up the JIRA installation directory

Backing up the JIRA home directory

Deleting the previous JIRA installation directory...

Extracting files ...


Please wait a few moments while JIRA Software is configured.
Installation of JIRA Software 8.0.2 is complete
Start JIRA Software 8.0.2 now?
Yes [y, Enter], No [n]
y

Please wait a few moments while JIRA Software starts up.
Launching JIRA Software ...
Installation of JIRA Software 8.0.2 is complete
Your installation of JIRA Software 8.0.2 is now ready and can be accessed
via your browser.
Custom modifications
Your previous JIRA installation contains customisations (eg server.xml) that
must be manually transferred. Refer to our documentation more information:
http://docs.atlassian.com/jira/jadm-docs-080/Upgrading+JIRA+applications+manually#UpgradingJIRAapplicationsmanually-configuringnewjiraasold3.4MigrateyourexistingJIRAconfigurationsovertoyournewJIRAinstallation
JIRA Software 8.0.2 can be accessed at http://localhost:8080

JIRA Software may take several minutes to load on first start up.
Finishing installation ...

# Compare changes of the following files:
        atlassian-jira/robots.txt
        bin/setenv.sh
        conf/server.xml