Configuring automatic database backups in Jira Service Management
The XML backup includes all data in the database. However, it doesn’t include your attachments directory, the Jira [shared] home directory, or Jira application installation directory, which are stored in the file system.
You can also perform XML backups manually. Learn more about backing up data
For large Jira installations and regular backups in production, we strongly recommend that you use native database backup tools instead of Jira's XML backup service.
Native database backup tools offer a much more consistent and reliable means of storing (and restoring) data while Jira is active. 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.
Add an automatic database backup service
To create a new database backup service or restore the default one if it’s been removed:
In the upper-right corner of the screen, select Administration > System.
In the side panel, under Advanced, select Services.
In the Add Service section, enter a descriptive, unique Name for the backup service.
Under the Class field, select Built-in services > Backup service.
Configure a Schedule and Interval by selecting one of the following options:
Daily—the service will run once or multiple times per day based on the set Interval.
Days per week—the service will run once or multiple times per day on specific days of the week based on the set Interval.
Days per month—the service will run at a specific time on a specific day of the month based on the set Interval.
Advanced—allows you to enter a custom cron expression for finer control over the schedule.
Select Add service.
On the Edit service page, save the backup service configuration by selecting Update.
Result
- For every successful backup, Jira will save a zipped XML backup to
<jira-home>/export/backups
. - If a scheduled backup fails for any reason, the zipped XML backup file will be saved to the
<jira-home>/export/backups/corrupted
directory together with a text file containing the failure log. This file will have the same name as the backup file with the.failure.txt
extension. Jira will create thecorrupted
directory for you when needed.
Update the configuration of an existing backup service
To change the schedule and interval settings of a configured backup service:
- In the upper-right corner of the screen, select Administration > System.
- In the side panel, under Advanced, select Services.
- In the list of services, find the backup service whose settings you want to update, and select Update.
- Optionally, on the Edit service page, enter a custom simple Date format.
- Update the Schedule and Interval by selecting one of the following options:
- Daily—the service will run once or multiple times per day based on the set Interval.
- Days per week—the service will run once or multiple times per day on specific days of the week based on the set Interval.
- Days per month—the service will run at a specific time on a specific day of the month based on the set Interval.
- Advanced—allows you to enter a custom cron expression for finer control over the schedule.
- Select Update to save the backup service configuration.
Result
The updated backup service will now run according to the new schedule.
Disable automatic database backups
If you don't want to use the automatic database backup mechanism built into Jira, you can disable it by removing the associated service.
To restore the service at a later time, simply configure a new one.
To disable the automatic database backup service:
- In the upper-right corner of the screen, select Administration > System.
- In the side panel, under Advanced, select Services.
- In the list of services, find the backup service that you want to disable, and select Delete.
Result
Jira will no longer take automatic XML snapshots of database contents.