How to create a Confluence 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 Confluence web interface, the UI, is not working properly, run and get the support zip is a challenge, requiring Confluence or a System administrator to collect log and configuration files by logging on the server where a Confluence node is running to retrieve them manually. 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.
- Recognize and have read permission on Confluence Home and Confluence Application folders (recommended root/Administrator or the Jira user if using Linux).
Attention when using Confluence 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.
Linux
Windows
For both Linux and Windows the support.zip
generated
<confluence-home>/export .
Other Notes
- This solution is not a substitute of UI Support Zip.
- Username and passwords are sanitized in confluence.cfg.xml, directoryConfigurationSummary (directories) and server.xml/tomcat-users.xml (tomcat configuration) when using Linux, for Windows it is still in progress.