How to create Jira Support Zip via command line
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When Jira web interface, the UI, is not working properly, running and getting the Support Zip is a challenge, requiring Jira or the System administrator to collect logs and data from the Operating 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 Operating System with:
/bin/bash
zip and/or gzip applications
To run in Windows the OS might have:
- Powershell
It's also required by the system administrator:
Being familiar with the Operating System command line interface.
- Recognize the Jira Home and Jira Application folders.
- Have read permission on Jira Home and Jira Application folders (recommended root/Administrator or the Jira user if using Linux).
Attention when using Jira Data Center with multiple nodes, the script shall be run in each node separately and the home folder refers to the Jira home from the node (not the shared home folder).
Script and its usage
Below you may find the scripts, usage, and real examples for Linux and Windows.
Linux
Windows
For both Linux and Windows the support.zip generated file will be placed at <jira-home>/export.
Other Notes
- This solution is not a substitute of UI Support Zip. If you have the chance to generate the support zip though the UI, please prefer to use it.
- Username and passwords are sanitized in dbconfig.xml (database), directoryConfigurationSummary (directories) and server.xml/tomcat-users.xml (tomcat configuration).