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 possibilities: native database backup tools, or JIRA's XML backup utility.
For production use, it is strongly recommended that for regular backups, you use native database backup tools instead of JIRA's XML backup service.
When JIRA is in use, XML backups are not guaranteed to be consistent as the database may be updated during the backup process. JIRA does not report any warnings or error messages when an XML backup is generated with inconsistencies and such XML 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.
Caveat: if you are migrating your instance, we recommend that you create an XML backup (per the directions in this guide) where possible. In certain cases, such as very large instance sizes, this may not be possible due to the system requirements for an XML backup.
Using 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 XML 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.
Using JIRA's XML backup utility
For all of the following procedures, you must be logged in as a user with the JIRA System Administrators global permission.
To perform a once-off backup, e.g. before an upgrade, follow the steps below.
You can also configure scheduled XML backups, as described in Automating JIRA application backups.
- Choose > System.
- Select Import & Export > Backup System to open the Backup JIRA data page.
Screenshot: The Backup JIRA Data Page
As shown in the screenshot above, the backup will be stored within the
exportsubdirectory of the JIRA application home directory.
- In 'File name' field, type the name of the backup file.
Ensure that JIRA has the necessary file system permissions to write to this location.
- Click the 'Backup' button and wait while your JIRA data is backed up.
JIRA will save your XML backup as a zipped archive file.
- When the backup is complete, a message will be displayed, confirming that JIRA has written its data to the file you specified.
2. Backing up the
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
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 MS Windows, a batch script copying the directory can be written and scheduled periodically (Programs > Accessories > System Tools > Scheduled Tasks).
- On Linux/Solaris, you can write a small shell script, placed in
/etc/cron.daily, backing up files to a directory like
/var/backup/jira. It is best to copy an existing script in
/etc/cron.dailyto ensure local conventions (file locations, lockfiles, permissions) are adhered to.
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, refer to the following guide on How to Transfer Large Files to Atlassian.