How to create a support zip via command line when Confluence is down

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 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 Systems with:

  • /bin/bash

  • zip and/or gzip applications

The administrator shall be able to:

  • Use Operating System command line interface.

  • Use an Operating System user with permission to read data from Confluence Home and Confluence installation folders (recommended root or Confluence user).
  • Recognize the Confluence Home and Confluence Application folders.

(warning) 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.

Script

File: supportzip_connie.sh

Usage

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

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

Output

# ./supportzip_connie.sh -h /opt/atlassian/confluence/confluence-home -a /opt/atlassian/confluence/atlassian-confluence-7.13.4

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


##############################
# Atlassian support zip tool #
##############################
User = confluence
Confluence Home = /opt/atlassian/confluence/confluence-home
Confluence App Directory = /opt/atlassian/confluence/atlassian-confluence-7.13.4

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

 - Packing application logs
cp: /opt/atlassian/confluence/confluence-home/logs/support is a directory (not copied).
 - Packing application config files
 - Packing configuration summary, if any available
 - Packing the last directoryConfigurationSummary available.
 - Packing seraph and crowd configuration files
 - Packing confluence customisations files
cp: /opt/atlassian/confluence/confluence-home/logs/support/customHtml.txt}: No such file or directory
cp: /opt/atlassian/confluence/confluence-home/logs/support/customStylesheet.txt}: No such file or directory
 - Packing custom layouts files
 - Packing synchrony configuration file
 - Packing cache configuration files
cp: /cache-settings-overrides.properties: No such file or directory
 - Packing tomcat configuration files
 - Packing healthcheckResults, if any available
 - Packing Tomcat logs
 - Packing the application.xml, if any available
 - Thread dump will not be collected

Creating zip file...

The support zip file can be found in /opt/atlassian/confluence/confluence-home/export/Confluence_support_2022-05-19-14-07-25.zip, please upload this file to Atlassian.
.
Have a g'day =) 


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

Confluence_support_2022-05-19-14-07-25
├── application-config
│   ├── confluence-init.properties
│   ├── confluence.cfg.xml
│   ├── log4j-diagnostic.properties
│   ├── log4j.properties
│   ├── logging.properties
│   ├── setclasspath-bat.txt
│   ├── setclasspath-sh.txt
│   ├── setenv-bat.txt
│   ├── setenv-sh.txt
│   ├── shutdown-bat.txt
│   ├── shutdown-sh.txt
│   ├── start-confluence-bat.txt
│   ├── start-confluence-sh.txt
│   ├── startup-bat.txt
│   ├── startup-sh.txt
│   ├── stop-confluence-bat.txt
│   ├── stop-confluence-sh.txt
│   └── web.xml
├── application-logs
│   ├── atlassian-confluence-index.log
│   ├── atlassian-confluence-index.log.1
│   ├── atlassian-confluence-jmx.log
│   ├── atlassian-confluence-outgoing-mail.log
│   ├── atlassian-confluence-profiler.log
│   ├── atlassian-confluence-security.log
│   ├── atlassian-confluence-sql.log
│   ├── atlassian-confluence.log
│   ├── atlassian-confluence.log.1
│   ├── atlassian-confluence.log.2
│   ├── atlassian-confluence.log.3
│   ├── atlassian-confluence.log.4
│   ├── atlassian-confluence.log.5
│   ├── atlassian-diagnostics.log
│   ├── atlassian-synchrony.log
│   └── atlassian-synchrony.log.1
├── application-properties
│   └── application.xml
├── auth-cfg
│   ├── May-16.directoryConfigurationSummary.txt
│   ├── crowd.properties
│   ├── seraph-config.xml
│   └── seraph-paths.xml
├── cache-cfg
├── confluence-customisations
│   └── layouts
│       ├── Space FirsSpace customised layout - decorators-main.vmd
│       ├── Space FirsSpace customised layout - decorators-page.vmd
│       ├── Space FirsSpace customised layout - decorators-space.vmd
│       └── customLayouts.txt
├── healthchecks
│   └── healthcheckResults.txt
├── synchrony-config
│   └── synchrony-args.properties
├── thread-dump
├── tomcat-config
│   ├── catalina.policy
│   ├── catalina.properties
│   ├── context.xml
│   ├── jaspic-providers.xml
│   ├── logging.properties
│   ├── server.xml
│   ├── tomcat-users.xml
│   └── web.xml
└── tomcat-logs
    ├── atlassian-synchrony-proxy.log
    ├── catalina.2022-04-01.log
    ├── catalina.2022-04-04.log
    ├── catalina.2022-04-05.log
    ├── catalina.2022-04-06.log
    ├── catalina.2022-04-07.log
    ├── catalina.2022-04-09.log
    ├── catalina.2022-04-11.log
    ├── catalina.2022-04-17.log
    ├── catalina.2022-04-18.log
    ├── catalina.2022-04-25.log
    ├── catalina.2022-04-29.log
    ├── catalina.2022-05-02.log
    ├── catalina.2022-05-04.log
    ├── catalina.2022-05-05.log
    ├── catalina.2022-05-06.log
    ├── catalina.2022-05-07.log
    ├── catalina.2022-05-11.log
    ├── catalina.2022-05-16.log
    ├── catalina.2022-05-18.log
    ├── catalina.out
    ├── conf_access_log.2022-04-19.log
    ├── conf_access_log.2022-04-20.log
    ├── conf_access_log.2022-04-21.log
    ├── conf_access_log.2022-04-22.log
    ├── conf_access_log.2022-04-23.log
    ├── conf_access_log.2022-04-24.log
    ├── conf_access_log.2022-04-25.log
    ├── conf_access_log.2022-04-29.log
    ├── conf_access_log.2022-05-02.log
    ├── conf_access_log.2022-05-03.log
    ├── conf_access_log.2022-05-04.log
    ├── conf_access_log.2022-05-05.log
    ├── conf_access_log.2022-05-06.log
    ├── conf_access_log.2022-05-07.log
    ├── conf_access_log.2022-05-08.log
    ├── conf_access_log.2022-05-09.log
    ├── conf_access_log.2022-05-10.log
    ├── conf_access_log.2022-05-11.log
    ├── conf_access_log.2022-05-12.log
    ├── conf_access_log.2022-05-13.log
    ├── conf_access_log.2022-05-14.log
    ├── conf_access_log.2022-05-15.log
    ├── conf_access_log.2022-05-16.log
    ├── conf_access_log.2022-05-17.log
    ├── conf_access_log.2022-05-18.log
    ├── conf_access_log.2022-05-19.log
    ├── gc-2022-04-01_14-54-55.log.0.current
    ├── gc-2022-04-01_15-00-44.log.0.current
    ├── gc-2022-04-01_15-28-07.log.0.current
    ├── gc-2022-04-01_15-41-19.log.0.current
    ├── gc-2022-04-01_15-46-34.log.0.current
    ├── gc-2022-04-01_16-06-19.log.0.current
    ├── gc-2022-04-01_16-12-43.log.0.current
    ├── gc-2022-04-04_16-25-35.log.0.current
    ├── gc-2022-04-04_16-32-47.log.0.current
    ├── gc-2022-04-04_16-47-57.log.0.current
    ├── gc-2022-04-09_22-25-36.log.0.current
    ├── gc-2022-04-17_12-27-43.log.0.current
    ├── gc-2022-04-25_15-09-12.log.0.current
    ├── gc-2022-04-25_15-34-24.log.0.current
    ├── gc-2022-04-25_15-44-24.log.0.current
    ├── gc-2022-04-25_17-34-47.log.0.current
    ├── gc-2022-04-29_14-19-27.log.0.current
    ├── gc-2022-04-29_14-53-42.log.0.current
    ├── gc-2022-05-02_13-49-00.log.0.current
    ├── gc-2022-05-02_14-06-16.log.0.current
    ├── gc-2022-05-16_12-05-26.log.0.current
    ├── host-manager.2022-04-01.log
    ├── host-manager.2022-04-04.log
    ├── host-manager.2022-04-09.log
    ├── host-manager.2022-04-17.log
    ├── host-manager.2022-04-25.log
    ├── host-manager.2022-04-29.log
    ├── host-manager.2022-05-02.log
    ├── host-manager.2022-05-16.log
    ├── localhost.2022-04-01.log
    ├── localhost.2022-04-04.log
    ├── localhost.2022-04-09.log
    ├── localhost.2022-04-17.log
    ├── localhost.2022-04-25.log
    ├── localhost.2022-04-29.log
    ├── localhost.2022-05-02.log
    ├── localhost.2022-05-16.log
    ├── manager.2022-04-01.log
    ├── manager.2022-04-04.log
    ├── manager.2022-04-09.log
    ├── manager.2022-04-17.log
    ├── manager.2022-04-25.log
    ├── manager.2022-04-29.log
    ├── manager.2022-05-02.log
    ├── manager.2022-05-16.log
    └── synchrony-proxy-watchdog.log
  


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

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).




Last modified on Sep 12, 2022

Was this helpful?

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