How to create Jira Support Zip via command line

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.

Summary

When Jira web interface, the UI, is not working properly, running and getting the Support Zip is a challenge, requiring Jira or System administrator to collect logs and data from the Operational System. 
To facilitate it, this solution comes to automatize the log/data search and packaging using the same structure the Support Zip tool provides beyond other benefits.

Environment and requirements

The solution runs in Linux based Operational System with:

  • /bin/bash

  • zip and/or gzip applications

The administrator shall be able to:

  • Use Operational System command line interface.

  • Use a Operational System user with permission to read data from Jira Home and Jira Application folders (recommended root or Jira user).
  • Recognize the Jira Home and Jira Application folders.

(warning) Attention when using Jira Data Center with multiple nodes, the script shall be run in each node separately.

Script and its usage

Below you may find the script, how to use and expected output.

Script

File: supportzip.sh

Usage

# ./supportzip.sh -h
Usage: ./supportzip.sh [-h <jira home path>] [-a <jira app path>] -t
          -h: obligatory, absolute path of jira home directory
          -a: obligatory, absolute path of jira application directory
          -t: optional, to run and collect thread dumps

The support.zip file will be placed at <jira-home>/export.

Output

# ./supportzip.sh -h /opt/atlassian/jira/jira-home -a /opt/atlassian/jira/atlassian-jira-software-8.20.6-standalone -t

        __          ------------------------------------------
 _(\    |@@|        | Beep - Generating Atlassian Support Zip  |
(__/\__ \--/ __    /_------------------------------------------
   \___|----|  |   __
       \ }{ /\ )_ / _\
       /\__/\ \__O (__
      (--/\--)    \__/
      _)(  )(_
     `------`


##############################
# Atlassian support zip tool #
##############################
User = jirauser
Jira Home = /opt/atlassian/jira/jira-home/
Jira App = /opt/atlassian/jira/atlassian-jira-software-8.20.6-standalone/

Hit CTRL+C (10s wait) if any path or user is incorrect.

 - Packing application logs
 - Packing application config files
 - Packing configuration summary, if any available
 - Packing Tomcat access logs
 - Packing cache configuration files
 - Packing tomcat configuration files
 - Packing healthcheckResults, if any available
 - Packing Tomcat logs
 - Packing the application.xml, if any available
 - Generating thread dumps -  this will take ~1 minute

Creating zip file...

The support zip file can be found in /opt/atlassian/jira/jira-home/export/Jira_support_2022-04-19-10-20-48.zip, please upload this file to Atlassian.
.
Have a g'day =)


Zip file structure (example from test environment, yours may be different):

Jira_support_2022-04-19-11-07-50
├── application-config
│   ├── dbconfig.xml
│   ├── entityengine.xml
│   ├── log4j.properties
│   ├── setclasspath-sh.txt
│   ├── setenv-sh.txt
│   ├── shutdown-sh.txt
│   ├── start-jira-sh.txt
│   ├── startup-sh.txt
│   └── stop-jira-sh.txt
├── application-logs
│   ├── atlassian-greenhopper.log
│   ├── atlassian-jira-apdex.log
│   ├── atlassian-jira-apdex.log.1
│   ├── atlassian-jira-apdex.log.2
│   ├── atlassian-jira-gc-2022-04-18_10-57-03.log.0.current
│   ├── atlassian-jira-http-access.log
│   ├── atlassian-jira-http-access.log.1
│   ├── atlassian-jira-http-access.log.2
│   ├── atlassian-jira-http-dump.log
│   ├── atlassian-jira-http-dump.log.1
│   ├── atlassian-jira-http-dump.log.2
│   ├── atlassian-jira-incoming-mail.log
│   ├── atlassian-jira-incoming-mail.log.1
│   ├── atlassian-jira-incoming-mail.log.2
│   ├── atlassian-jira-incoming-mail.log.3
│   ├── atlassian-jira-outgoing-mail.log
│   ├── atlassian-jira-outgoing-mail.log.1
│   ├── atlassian-jira-outgoing-mail.log.2
│   ├── atlassian-jira-perf.log
│   ├── atlassian-jira-perf.log.1
│   ├── atlassian-jira-perf.log.2
│   ├── atlassian-jira-perf.log.3
│   ├── atlassian-jira-perf.log.4
│   ├── atlassian-jira-perf.log.5
│   ├── atlassian-jira-querydsl-sql.log
│   ├── atlassian-jira-querydsl-sql.log.1
│   ├── atlassian-jira-querydsl-sql.log.2
│   ├── atlassian-jira-security.log
│   ├── atlassian-jira-security.log.1
│   ├── atlassian-jira-security.log.2
│   ├── atlassian-jira-slow-queries.log
│   ├── atlassian-jira-slow-queries.log.1
│   ├── atlassian-jira-slow-queries.log.2
│   ├── atlassian-jira-slow-querydsl-queries.log
│   ├── atlassian-jira-slow-querydsl-queries.log.1
│   ├── atlassian-jira-slow-querydsl-queries.log.2
│   ├── atlassian-jira-sql.log
│   ├── atlassian-jira-sql.log.1
│   ├── atlassian-jira-sql.log.2
│   ├── atlassian-jira-xsrf.log
│   ├── atlassian-jira-xsrf.log.1
│   ├── atlassian-jira-xsrf.log.2
│   ├── atlassian-jira.log
│   ├── atlassian-jira.log.1
│   ├── atlassian-jira.log.10
│   ├── atlassian-jira.log.2
│   ├── atlassian-jira.log.3
│   ├── atlassian-jira.log.4
│   ├── atlassian-jira.log.5
│   ├── atlassian-jira.log.6
│   ├── atlassian-jira.log.7
│   ├── atlassian-jira.log.8
│   ├── atlassian-jira.log.9
│   ├── atlassian-remoteapps-security.log
│   ├── atlassian-remoteapps-security.log.1
│   ├── atlassian-remoteapps-security.log.2
│   ├── atlassian-servicedesk.log
│   ├── audit
│   │   ├── 20220216.00000.audit.log
│   │   ├── 20220217.00000.audit.log
│   │   ├── 20220221.00000.audit.log
│   │   ├── 20220222.00000.audit.log
│   │   ├── 20220223.00000.audit.log
│   │   ├── 20220224.00000.audit.log
│   │   ├── 20220303.00000.audit.log
│   │   ├── 20220304.00000.audit.log
│   │   ├── 20220309.00000.audit.log
│   │   ├── 20220316.00000.audit.log
│   │   ├── 20220318.00000.audit.log
│   │   ├── 20220324.00000.audit.log
│   │   ├── 20220325.00000.audit.log
│   │   ├── 20220329.00000.audit.log
│   │   ├── 20220331.00000.audit.log
│   │   ├── 20220405.00000.audit.log
│   │   ├── 20220407.00000.audit.log
│   │   └── 20220419.00000.audit.log
│   ├── insight_audit.log
│   ├── insight_automation.log
│   ├── insight_automation.log.2022-02-22
│   ├── insight_automation.log.2022-02-28
│   ├── insight_automation.log.2022-03-03
│   ├── insight_automation.log.2022-03-04
│   ├── insight_automation.log.2022-03-09
│   ├── insight_automation.log.2022-03-16
│   ├── insight_automation.log.2022-03-18
│   ├── insight_automation.log.2022-03-23
│   ├── insight_automation.log.2022-03-24
│   ├── insight_automation.log.2022-03-25
│   ├── insight_automation.log.2022-04-05
│   ├── insight_import.log
│   ├── insight_objectschema_export.log
│   ├── insight_objectschema_import.log
│   ├── insight_workflow.log
│   └── jira-diagnostics.log
├── application-properties
│   └── Apr-19.application.xml
├── auth-cfg
│   └── Apr-19.directoryConfigurationSummary.txt
├── cache-cfg
│   ├── cache.properties
│   └── oscache.properties
├── cluster-nodes
├── healthchecks
│   └── Apr-19.healthcheckResults.txt
├── thread-dump
│   ├── threaddump_1650377280.tdump
│   ├── threaddump_1650377280_cpu_usage.txt
│   ├── threaddump_1650377291.tdump
│   ├── threaddump_1650377291_cpu_usage.txt
│   ├── threaddump_1650377301.tdump
│   ├── threaddump_1650377301_cpu_usage.txt
│   ├── threaddump_1650377311.tdump
│   ├── threaddump_1650377311_cpu_usage.txt
│   ├── threaddump_1650377321.tdump
│   ├── threaddump_1650377321_cpu_usage.txt
│   ├── threaddump_1650377331.tdump
│   └── threaddump_1650377331_cpu_usage.txt
├── tomcat-access-logs
│   ├── access_log.2022-04-09
│   ├── access_log.2022-04-10
│   ├── access_log.2022-04-11
│   ├── access_log.2022-04-18
│   └── access_log.2022-04-19
├── tomcat-config
│   ├── catalina.policy
│   ├── catalina.properties
│   ├── context.xml
│   ├── jaspic-providers.xml
│   ├── jaspic-providers.xsd
│   ├── logging.properties
│   ├── server.xml
│   ├── tomcat-users.xml
│   ├── tomcat-users.xsd
│   └── web.xml
└── tomcat-logs
    ├── atlassian-jira-gc-2022-04-05_09-42-32.log.0.current
    ├── catalina.2022-04-11.log
    ├── catalina.2022-04-18.log
    ├── catalina.out
    ├── host-manager.2022-04-18.log
    ├── localhost.2022-04-18.log
    └── manager.2022-04-18.log


A log is also created in <jira-home>/export with more detailed output.

Other Notes

  • This solution is not a substitute of UI Support Zip.
  • Username and passwords are sanitized in dbconfig.xml (database),  directoryConfigurationSummary (directories) and server.xml/tomcat-users.xml (tomcat configuration).




Last modified on Nov 21, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.