Configuring automatic database backups

Still need help?

The Atlassian Community is here for you.

Ask the community

When you install Jira and complete the run the setup wizard, an database backup service will run automatically every 12 hours by default. The backup service generates a complete XML snapshot of database contents and saves it inside a compressed ZIP archive into the predefined export subdirectory of the Jira [shared] home directory. You can add additional backup services that run on different schedules, update existing service configurations, or disable automatic backups.

On this page:

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:

  1. In the upper-right corner of the screen, select Administration > System.

  2. In the side panel, under Advanced, select Services.

  3. In the Add Service section, enter a descriptive, unique Name for the backup service.

  4. Under the Class field, select Built-in services > Backup service.

  5. 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.

  6. Select Add service.

  7. 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.
  • If a scheduled backup fails for any reason, the zipped XML backup file will be saved to the <jira-home>/export/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 the corrupted 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:

  1. In the upper-right corner of the screen, select Administration > System.
  2. In the side panel, under Advanced, select Services.
  3. In the list of services, find the backup service whose settings you want to update, and select Update.
  4. Optionally, on the Edit service page, enter a custom simple Date format.
  5. 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.
  6. 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.

tip/resting Created with Sketch.

To restore the service at a later time, simply configure a new one.

To disable the automatic database backup service:

  1. In the upper-right corner of the screen, select Administration > System.
  2. In the side panel, under Advanced, select Services.
  3. 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.

Last modified on Mar 16, 2023

Was this helpful?

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