Backing up my confluence (latest version)


I want to make sure my server is completely backed up.

this is what I do:

  1. schedule a daily backup of my site to  /var/atlassian/application-data/confluence/backups (in conlfuence administrator)
  2. I have the following script that will also backup data and my mysql scheme.

This is the script:

#!/bin/bash -x
CNFL_BACKUP=/home/cnflBackup/`date +%Y%m%d-%H%M%S`

rm -rf $CNFL/temp/*
mysqldump --defaults-file=~/.my.conf confluence |gzip > $CNFL_BACKUP/
tar -cjvf $CNFL_BACKUP/data.bzip $CNFL > $CNFL_BACKUP/homedir.status
[root@CentOS-7 elad]# cat 
#!/bin/bash -x
CNFL_BACKUP=/home/cnflBackup/`date +%Y%m%d-%H%M%S`

###rm -rf $CNFL/temp/*
mysqldump --defaults-file=~/.my.conf confluence |gzip > $CNFL_BACKUP/
tar -cjvf $CNFL_BACKUP/data.bzip $CNFL > $CNFL_BACKUP/homedir.status


  • am I missing anything?
  • the files and folders I backup in Confluence "backup Administration" is the same as my script?
  • /var/atlassian/application-data/confluence - is the folder I want to backup?
  • what about backing up /opt/atlassian/confluence ? do I need to backup this one as well?




3 answers

0 votes
Timothy Chin Community Champion Apr 12, 2015

Everything looks good. There are some configurations in /opt/atlassian/confluence/confluence/WEB-INF/classes that you may want to consider backing up if they have been modified. 

0 votes
Chuck Talk Atlassian Team Apr 12, 2015

Hi Elan,

The preferred method is to us the Production Backup Strategy, which is to use the native backup tools provided by your database, as below:

Establishing a production system backup solution

Atlassian recommends establishing an alternative database backup strategy:

  • Create a backup or dump of your database using tools provided by your database
    warning To avoid any data inconsistency and corruption, it is recommended to shut down Confluence before creating a database backup or dump.
  • Create a file system backup of your Confluence home directory
  • Create a file system backup of your shared home directory (Clustered instances only)

Once this is in place, disable the daily backups through the scheduled jobs feature via 'Administration Console > Administration > Scheduled Jobs'.

We want to stress that creating these two backups is better than having a Confluence XML backup. It is more robust and far more reliable for large production instances. You will be able to restore your whole site, including all data, attachments and configuration information intact with these two backups. See Restoring Data from other Backups.

Which files need to be backed up?

Backing up the whole home directory is the safest option, however most files and directories are populated on startup and can be ignored. At minimum, these files/directories must be backed up:

  • <conf-home>/confluence.cfg.xml
  • <conf-home>/attachments

The rest of the directories will be auto-populated on start up. You may also like to backup these directories:

  • <conf-home>/config – if you have modified your ehcache.xml file.
  • <conf-home>/index – if your site is large or reindexing takes a long time – this will avoid the need for a full reindex when restoring.

The location of the home directory is configured on installation and is specified in the file. For installation created with the automatic installer the default locations are:

  • Windows    C:\Program Files\Atlassian\Application Data\Confluence
  • Linux     /var/atlassian/application-data/confluence

For Clustered instances only: Backing up the whole shared home directory is the safest option, however some files and directories are populated at runtime and can be ignored:

  • <conf-home>/thumbnails
  • <conf-home>/viewfile. 

I do hope this information is helpful to you.


Chuck Talk | Confluence Support

what about backing up /opt/atlassian/confluence ?

I also edited server.xml and web.xml - don't we need to backup these files and folders?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

406 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you