Search code examples
dockerjirajira-plugin

Restore JIRA from native instance to docker container


Currently, I am using JIRA native instance. Now I want to convert it into docker container. Can anyone suggest me a way to do so?


Solution

  • You can definitely restore JIRA native into a docker container using docker.

    Steps:

    • Backup existing JIRA
    • Launch a dockerized JIRA
    • Restore new JIRA

    - Backup existing JIRA

    - Launch a JIRA dockerized

    Use a community image as official image don't exist yet

    docker run --name jira --detach --publish 8080:8080 cptactionhank/atlassian-jira-software:latest
    
    • Install using the options you want

    - Restore new JIRA

    Copy the entities.xml to be ready to restore it:

    cd backup
    # copy inside of the docker
    docker cp entities.xml jira:/var/atlassian/jira/import/
    

    Navigate to http://localhost:8080/secure/admin/XmlRestore!default.jspa

    • Type entities.xml in the File Namefield
    • Press Restore
    • It might take time if it's big
      Done!

    Improvement

    Use a volume if you want to keep your data persistent:

    docker run -v jira_data:/var/atlassian ...