Available since v. 1.22.*

Available since v. 1.32.*

  • added Check Import/Export directory 

General information

note

Available ONLY for JIRA System administrators

Available ONLY for JIRA System administrators


Create backup

Method type -

URL: {JIRA_URL}/rest/extender/1.0/xmlbackup/backup

Request format - 

Example request

{
	"fileName": "BACKUP_02.03.2019.zip"
}
  • fileName - required - backup file name

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

Example response

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



Restore backup

Method type -

URL: {JIRA_URL}/rest/extender/1.0/xmlbackup/restore

Request format - 

Example request

{
	"fileName": "BACKUP_02.03.2019.zip",
	"license": "LICENSE FOR JIRA"
}
  • fileName - required - backup file name

  • license - optional

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

Example response

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



Check restore status

Method type - 

URL: {JIRA_URL}/rest/extender/1.0/xmlbackup/restore/status

Respons format -  

Example response

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

  • Response code 200 and JSON

Restore is not active or restore completed

{
    "status": "nothing to do"
}


Restore in progress

{
    "status": "in progress"
}


  • Response code 503

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


Check Import/Export directory

Method type - 

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

Example response

{
    "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"
}
{
    "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) - if you set this parameter to true, all dates format change into string yyyy-MM-dd HH:mm:ss.SSS