Documentation for JIRA 4.1. Documentation for other versions of JIRA is available too.

JIRA can be configured to automatically create an XML backup of JIRA data on a routine basis.

The XML backup includes all data in the database. However, it does not include your attachments directory, JIRA Home Directory or JIRA Installation Directory, which are on the filesystem.

For production use, it is strongly recommended to use native database-specific tools instead of the XML backup service. XML backups are not guaranteed to be consistent, as the database may be updated during the backup process. Inconsistent backups are created successfully without any warnings or error messages, but fail during the restore process. Database-native tools offer a much more consistent and reliable means of storing data.


When JIRA is installed, the first step in the Setup Wizard prompts you for a backup path, and if entered, JIRA will automatically generate XML backups (as ZIP files) every 12 hours. If you did not specify this path, follow the steps below to enable automated backups. (Note that you can also perform XML backups manually - see Backing up data. )

  1. Log in as a user with the 'JIRA System Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. Under the 'System' sub-menu in the left-hand navigation column, click the 'Services' link.
  4. This will display the 'Services' page. It lists the current services running on this system. By default there should be one service running: 'Mail Queue Service'. You cannot delete this service.
  5. Fill in the 'Add Service' form as follows:
    • For 'Name', enter a descriptive name, e.g. Backup Service
    • For 'Class', enter the appropriate class text string for the 'Backup service' using either of the following methods:
      • Select the 'Backup service' from the list of JIRA's 'built-in services'. To do this,
        1. Click the 'Built-in Services' link below the 'Class' field to expand the list of JIRA's 'built-in services'.
        2. Click the 'Backup Service' link. The 'Class' field will automatically be populated with the following class text string 'com.atlassian.jira.service.services.export.ExportService'.
      • Type the class text string 'com.atlassian.jira.service.services.export.ExportService' into the 'Class' field.
    • For 'Delay', enter the number of minutes between backups. A good default for this would be 720 minutes (12 hours).

      Note
      The interval specified in the Backup Service Delay (mins) is the time when the next backup job will run since the last server restart. Backup services cannot be scheduled to run at a specific time of day - please see JRA-1865 for more on this.

  6. Click the 'Add Service' button.
  7. The 'Edit Service' page will be displayed. Fill in the following fields:
    • If you wish to write your backup files to the default directory, leave the 'Use Default Directory' checkbox checked. By default, your backup files are written to your JIRA home directory under the exports sub-directory.
    • If you wish to specify a different sub-directory, type the full path of the directory to which JIRA will write backup files in the 'Directory Name' textbox. Ensure that the 'Use Default Directory' checkbox is unchecked and that JIRA has rights to write to this location.

      Changing your backups path


      If you are running a large instance of JIRA, you may wish to consider moving your backups directory from the default directory under JIRA home to another machine. The directory which stores your backups may need to hold a considerable amount of data. Hence, it may be more efficient for you to host the attachments on a separate network drive.

      If you see the following message at the top of the page,

      Changing the attachment, index, backup or restore settings is not allowed for security reasons. You must edit jira-application.properties and explicitly set 'jira.paths.set.allowed=true'. Restart JIRA and then the path settings will be able to be changed.

      then you must first configure your JIRA installation to permit modification to its file path settings. To do this:

      1. Follow the procedure for Enabling Modification to JIRA's File Path Settings, which requires JIRA to be shut down and restarted.
      2. Restart this particular procedure from step 1 (above). However, when the 'Services' page is displayed (after step 3), locate the backup service you just created and click its 'Edit' link in the 'Operations' column. This opens the service's 'Edit Service' page.
      3. Continue the procedure from step 7 (above).


      If you change your backups directory, please ensure that it is given appropriate security, as described in Security Overview.

    • For 'Date format', specify the format which JIRA will use to name the individual backup files. This format can be anything that SimpleDateFormat can parse. A good default is 'yyyy-MMM-dd-HHmm', which would generate files named like this: '2007-Mar-05-1322'.
    • For 'Backup as:', either:
      • Select 'XML' to have JIRA store your data as an XML file; or
      • Select Zip' to have JIRA to compress your backup and store it as a ZIP file.
  8. Click the 'Update' button.
    Your backup service is now configured. XML backups will be performed according to the schedule you specified in the Delay field (above).
    • For every successful backup, an XML (or ZIP) file will be saved in the backup directory that you specified in the Directory Name field (above).
    • If a scheduled backup fails for any reason, the XML (or ZIP) file will be saved into the 'corrupted' directory, which is directly under your nominated backup directory. (NB. JIRA will created the 'corrupted' directory if required - you don't need to create it.) Additionally, a file explaining the reason for the failure will be written to the 'corrupted' directory. This file will have the same name as the backup file, but with the extension '.failure.txt'.

If you changed your backups path (above), it is strongly recommended that you follow the procedure for Securing JIRA's File Path Settings to minimise the risk of your JIRA installation being compromised by security-related attacks.