Documentation for Confluence 5.7.
Documentation for Confluence Cloud and earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

Confluence backs up your data regularly into a zipped XML file. By default, this backup is performed at 2.00 a.m. each day and the backup files are stored in the backups folder under the Confluence Home directory. The default naming convention for the backup files is 'backup-yyyy_MM_dd'. Confluence can write backups to both local and mapped network drives.

From the Backup Administration section of Confluence's administration console, you can:

  • Include or exclude attachments in backups.
  • Configure a different path to store backup files. (By default, this option is not available. See below for information about enabling the configuration option.)
  • Change the naming format used for the files.

(tick) You can also change the schedule of this backup using Confluence's scheduled jobs feature.

(info) You need to have System Administrator permissions in order to configure these options.

On this page:

Related pages:

(warning) The information on this page does not apply to Confluence Cloud.

Configuring Confluence Backups

To configure Confluence backups:

  1. Choose the cog icon , then choose General Configuration under Confluence Administration
  2. Click 'Backup Administration' in the 'Configuration' section.
  3. Click the 'Edit' button on the 'Backup Administration' screen.
  4. Now you can do the following:
    • To use a different naming prefix format — Enter the new format in the 'Backup File Prefix' input field.
    • To use a different date format — Enter the date format in the 'Backup File Date Pattern' input field using the syntax described in this document from Sun.
    • To exclude attachments from backups — Deselect 'Backup Attachments'. By default, this feature is 'On'.
    • To specify an alternate path to store backup files (if enabled) — Select 'Custom' and then enter the path. The directory must be on either a local drive or a mounted network drive.
      (info)Notes:
      • By default, this option is not available. See below for information about enabling the configuration option.
      • Please ensure the mapped drive is on a physical server, not a Virtual Machine image.
  5. 'Save' your changes.

(tick) You can disable Confluence backups through the scheduled jobs feature.

Screenshot above: Editing the Backup Configuration

Enabling Backup Path Configuration

By default, it is not possible to specify a backup path via the Confluence Administration Console. This feature is disabled by default for security reasons. Administrators can restore this functionality by updating the relevant configuration property as described below. However, we recommend that you turn the feature off in production environments. For production environments, please review our Production Backup Strategy.

To enable the configuration option:

  1. Edit the confluence.cfg.xml file found in the Confluence Home and other important directories.
  2. Set the value of property admin.ui.allow.daily.backup.custom.location to 'true' (without the quotation marks).

    confluence.cfg.xml
  3. Restart Confluence.

If the value of the above configuration property is 'true', it will be possible to specify a backup path via the Confluence Administration Console. If the value of this property is 'false' or the property is not present in the configuration file, the backup path is not configurable.

Notes

Time is derived from the Confluence server

The time zone is taken from the server on which Confluence is running.

To check the time according to the server, do the following:

  1. Choose the cog icon , then choose General Configuration under Confluence Administration
  2. Click 'System Information' in the left-hand panel and look at the 'System Time'.

Backup strategy for large Confluence sites

Consider using the production backup strategy if your Confluence site is large or you are encountering problems with your automated backup.

9 Comments

  1. If you enable daily backups, and you leave the Backup File Date Pattern configured default, you will accumulate an endless amount of backups. This will eventually fill up your server and cause problems - hence the warning about this on the top of the page.

    A elegant and easy way around this, is to change the date pattern. If you change it to EEEE, the backups will be called:

    • daily-backup-Monday
    • daily-backup-Tuesday
    • daily-backup-Wednesday
    • etc.

    After one week the old backups get overwritten. You will never have more than seven backups.

    Similarly, to keep at most one month's worth of backups, change it to dd, and you will end up with files like:

    • daily-backup-01
    • daily-backup-02
    • daily-backup-03
    • daily-backup-04
    • etc.

    I used to have scripts to delete old backups, but this is easier. Poor man's backup rotation ;-)

  2. Anonymous

    (1) Where are the allowed backup patterns, defined, please ?  (Do we have to guess at the possibilities ?)

    (2) For example, what would this pattern do ?

    backup-yyy_EEEE-overwritten

     

    (3) Would it produce this series, shown below ?

    backup-2012-Monday-overwritten.zip
    backup-2012-Tuesday-overwritten.zip
    backup-2012-Wednesday-overwritten.zip
    backup-2012-Thursday-overwritten.zip
    backup-2012-Friday-overwritten.zip
    backup-2012-Saturday-overwritten.zip
    backup-2012-Sunday-overwritten.zip
    backup-2012-Monday-overwritten.zip       ...

     

     

     

    1. You are not about to add a string of text at the end backup file name.

  3. Valid Backup File Date Patterns are based on the Java SimpleDateFormat class:  http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

    For a more detailed breakdown of the options, see http://www.adaptavist.com/display/AtlassianConfluence/Date+Formats

  4. Hi, trying to change backup location to network shared drive which is mapped as q, still getting answer Backup path specified does not exist.

    When I put C:\, all is OK, when I put Q:\ or synology.buzalka.local\public (which is path to Q) I got error above.


    Can you advice?


    V.

    1. the windows user running Confluence may not have access to the q: network map. (may be it is an admin user and you have map with the regular user)

  5. Looks like this page is not 100% correct.

    After re-installing my Confluence to another folder, my  archive copy backups are still being generated under the old folder for no reason.

    The Confluence Home Directory is correct and is pointing to the new directly.

    If I manually backup, it goes to the correct folder...If I manually backup with the Archive copy it goes to the wrong folder so does the scheduled job (automatic backup every day) that generate them in the wrong folder. I checked all config and everything point to the new folder so this must be setup somewhere else... is this in the database ?

    1. I have observed the same.

      I think there might be cached information. It might help to restart the server, to get the expected backup storage folder.

  6. I had a similar issue to Simon Leclercq.  After migrating to a new Linux system for Confluence, I could not run a backup going to the default location.  If I ran General Configuration | Backup & Restore | Backup and checked the box "Archive to backups folder" the process would result in an error: Cause | java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Method).

    So I followed these steps as suggested: I edited /var/atlassian/application-data/confluence/confluence.cfg.xml file and altered admin.ui.allow.daily.backup.custom.location to 'true' (without the quotation marks).  I restarted Confluence and then checked the Backup location and neither the default nor the custom option were enabled.  I enabled the default and ran a backup: General Configuration | Backup & Restore | Backup with the box "Archive to backups folder" checked.  The backup ran successfully.  I then undid my steps of altering admin.ui.allow.daily.backup.custom.location to 'false' (without the quotation marks) and restarted Confluence.  I then ran the same backup process with the box "Archive to backups folder" checked.  The backup ran successfully again.  So now my backup process is running as expected which will come in handy for future migrations.