XML Backup/Restore

General information

Available since v. 1.22.*

Available since v. 1.32.*

  • added Check Import/Export directory 

Available ONLY for JIRA System administrators


Create backup

Method type - POST

URL:

  • {JIRA_URL}/rest/extender/1.0/xmlbackup/backup

Request format - JSON

Several users
{
	"fileName": "BACKUP_02.03.2019.zip"
}
  • fileName - required to create backup

Respons format - JSON (Response is send when backup was created)

Several users
{
	"filePath": "/localhost/atlassian/jira/home/export/BACKUP_02.03.2019.zip",
	"message": "Backup created",
	"status": "done"
}


Restore backup

Method type - POST

URL:

  • {JIRA_URL}/rest/extender/1.0/xmlbackup/restore

Request format - JSON

Several users
{
	"fileName": "BACKUP_02.03.2019.zip",
	"license": "LICENSE FOR JIRA"
}
  • fileName - required to create backup
  • license - optional

Respons format - JSON (Response is send when restore is accepted and run in background)

Several users
{
    "message": "JIRA is currently being restored from backup",
    "status": "in progress"
}

Check restore status

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/xmlbackup/restore/status

Respons:

How to read answers (any version of JIRA can response a little differently)

Get response code 200 and JSON

Restore is not active or restore completed

Several users
{
    "status": "nothing to do"
}

Restore in progress

Several users
{
    "status": "in progress"
}

Get response code 503

This means that JIRA restores itself from the backup, check status the restore later


Check Import/Export directory

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/xmlbackup/checkDirectory/export
  • {JIRA_URL}/rest/extender/1.0/xmlbackup/checkDirectory/import
  • {JIRA_URL}/rest/extender/1.0/xmlbackup/checkDirectory/export?formatDate=true
  • {JIRA_URL}/rest/extender/1.0/xmlbackup/checkDirectory/import?formatDate=true

Respons:

Several users
{
    "path": "/Volumes/ssd01/extender-jira/jira/home/export",
    "files": [
                {
                    "size": 46667,
                    "name": "2019-06-03--0627.zip",
                    "lastModified": "2019-07-03 06:28:01.000"
                },
                {
                    "size": 64289,
                    "name": "2019-07-03--1658.zip",
                    "lastModified": "2019-07-03 16:58:25.000"
                }
            ],
    "directoryType": "export"
}
Several users
{
    "path": "/Volumes/ssd01/extender-jira/jira/home/import",
    "files": [
                {
                    "size": 46667,
                    "name": "2019-07-03--0627.zip",
                    "lastModified": 1562128081000
                },
                {
                    "size": 64289,
                    "name": "2019-8-03--1658.zip",
                    "lastModified": 1562248257000
                }
            ],
    "directoryType": "import"
}

Parameters

  • formatDate - optional - available value (true or empty) - default worklog dates (createdDate, lastUpdatedDate, startDate) format is milliseconds, if you set this parameter to true, all dates format change into string yyyy-MM-dd HH:mm:ss.SSS