Backing up data

This page describes how to back up your Jira data, and establish processes for maintaining continual backups. Backing up your Jira data is the first step in upgrading your server to a new Jira revision, or splitting your Jira instance across multiple servers.

See also Restoring data and Restoring a project from backup.

Creating a complete backup of Jira consists of two stages:

1. Backing up database contents

There are two options available to back up database contents: 

  1. RECOMMENDED Using native database backup tools
  2. Using Jira's backup utility

For regular backups in production use, we strongly recommend that you use native database backup tools instead of Jira's XML backup service.

When Jira is in use, there’s no guarantee that XML backups will be consistent as the database may be updated during the backup process. Jira doesn't report any warnings or error messages when an XML backup is generated with inconsistencies and such backups will fail during the restore process. Native database backup tools offer a much more consistent and reliable means of storing (and restoring) data while Jira is active.

Option 1: Use native database backup tools

All serious databases come with tools to back up and restore databases (the "MS" in RDBMS). We strongly recommend these tools in preference to the backup option described below, as they:

  • ensure integrity of the database by taking the backup at a single point in time
  • are much faster and less resource-intensive than Jira's XML backup
  • integrate with existing backup strategies (e.g. allowing one backup run for all database-using apps)
  • may allow for incremental (as opposed to "full") backups, saving disk space
  • avoid character encoding and format issues relating to Jira's use of XML as a backup format

See the documentation for your database on how to set up periodic backups. This typically involves a cron job or Windows scheduled task invoking a command-line tool like mysqldump or pg_dump.

Option 2: Use Jira's backup utility

For all of the following procedures, you must be logged in as a user with the Jira system administrator global permissions.

To perform a once-off backup, e.g. before an upgrade, follow the steps below.

This section explains how to perform a once-off backup (e.g. before an upgrade). You can also configure scheduled XML backups, as described in Automating Jira application backups.

To do a once-off backup:

  1. In the upper-right corner of the screen, select Administration  > System.
  2. Under Import and export (the left-side panel), select Backup system to open the Backup Jira data page.

  3. In the File name field, enter the name of the backup file. Make sure that Jira has the necessary file system permissions to write to this location.

    The backup will be stored within the export subdirectory of the Jira application (shared) home directory.

  4. Select the Backup button and wait until your Jira data is backed up. Jira will save your XML backup as a zipped archive file.

  5. When the backup is complete, you’ll see a message confirming that Jira has written its data to the file you specified.

2. Backing up the data directory

It’s crucial that you back up your Jira application’s data directory, which is a sub-directory of the Jira application home directory (jira-home for short).

The data directory contains application data for your Jira instance. For example, issue attachments are stored in the <jira-home>\data\attachments directory.

Backing up the JIRA index

The Jira index is stored in a different sub-directory, <Jira-home>\caches. On large instances, we recommend that you enable "restorable index" in the system options to create backups of the index that you can restore later.

There’s no one specific way to back up the data directory, but here are a couple of methods you might consider:

  • On Microsoft Windows. You can write a a batch script copying the directory, and schedule it to run periodically. To set up scheduled tasks, search for the “Task Scheduler” in the Windows task bar.
  • On Linux/Solaris. You can write a small shell script placed in /etc/cron.daily. The script would back up files to a directory like /var/backup/jira. It is best to copy an existing script in /etc/cron.daily to ensure the alignment with local conventions (file locations, lockfiles, permissions).

If you have put your attachments directory in a custom location rather than inside the data directory, you'll need to back up your attachments directory separately.

If you have a large file, see How to transfer large files to Atlassian.

Last modified on Nov 2, 2022

Was this helpful?

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