in Alfresco

Alfresco Backup and Disaster Recovery


Alfresco backup and disaster recovery is the most important part of alfresco setup, and should be thought beforehand and long before alfresco is put into usage. In this post we are going to cover how to setup your alfresco server and be safe when things go wrong.


Before you start doing backups you need to look at your business and calculate two things:

  1. How long can my system be offline without having any problems with customers? This is called Recovery Time Objective or RTO.
  2. How many documents can my clients lose, or how many hours/days of data can I lose and not lose my business. This part is called Recovery Point Objective RPO.

Be extra careful with this answers as your business depends on it!

There are multiple types of backup techniques:

  1. Cold backup, this is when your system is down and you slowly backup all data to a safe location.
  2. Warm backup, this type of backup is when your system is operating but in read-only mode.
  3. Hot backup, this type of backup and is done when your system is working and possibly used.

There are multiple backup levels:

  1. Full backup, this is when you are performing backup on all the data, files and configurations.
  2. Incremental backup, when you are performing backup on only what is changed from the last backup performed.
  3. Cumulative backup, when you are performing backup only on what is changed from the latest full backup.

Additionally you need to know at what time are you going to do the backup, how often and where are you going to save the backup itself .

What to backup?

Before all you need to know what you should backup and in what order. This is so important as pressing the break on your car before turning the key.

If you are not performing cold backup then next order should be followed as it is.

  • Indexes ( from index backup or original index files )
  • Database
  • Content stores
  • Logs, configuration files, installation…

This way nothing will be lost and when the time comes to restore you can be sure that all will be ok.

Indexes, when backup of indexes is being performed you should backup the backup of the indexes (in case of warm or hot backup). Alfresco has scheduled job that works with indexes that you must wait to finish. This job performs the backup of the indexes.

Solr Index backup job configuration

solr.backup.alfresco.cronExpression=0 0 2 * * ?
solr.backup.archive.cronExpression=0 0 4 * * ?

Solr backup index location


Lucene backup job configuration

index.backup.cronExpression=0 0 3 * * ?

Additionally what you must take into account is deleting the orphans. Orphan is the node that is deleted permanently ( from trashcan as well) and only thing that remains is the file in the archived store. This file is after 14 days moved to contentstore.deleted.This is done by cron job named orphanCleanup.

OrphanCleanup job configuration

system.content.orphanCleanup.cronExpression=0 0 4 * * ?
system.content.eagerOrphanCleanup=false #move to oblivion immediately

You should wait for orphan moving to be completed and then start your backup procedure.

Backup procedures

Cold backup, this kind of backup is the safest of all and should be used when possible. Backup is done using next steps:

  1. Stop alfresco
  2. Backup index
  3. Backup the alfresco database
  4. Backup the contentStore(and other stores you want)
  5. Backup the configuration and other files
  6. Start alfresco

Main problem here is that service is unavailable to the users while backup is being performed. If you decide to use this kind of backup procedure than night would probably be perfect time.

Warm backup, if you have option to set alfresco into read only mode then after this being set you can use cold backup steps. Only difference is index backup part. Here you will use index backup.  Above all we must backup when cron jobs are not running.

Hot backup, as mentioned before we need to do a backup while users are using the system. Above all we must backup when cron jobs are not running( index backup and orphan removal) and we must do database backup without locking the db and make a snapshot of db ( one transaction). With this in mind you can perform backup using order mentioned above.



Restoring the system is always done using the same procedure with one thing that is different and that is how the index is restored. If cold backup is restored than we have original indexes and if warm or hot backup is being restored than we restore index backup as it is original index location.

Restore procedure steps

  1. Stop alfresco
  2. Restore indexes
  3. Restore mysql
  4. Restore Content
  5. Restore all configuration and other data
  6. Start the alfresco

Missing indexes will be added on the start of alfresco service, for this to work you need to have index.recovery.mode set to AUTO.


Backup and restore of alfresco system can be easy and with no problems at all if all points of this tutorial is taken into account.

This post is put together using alfresco wiki, other tutorials, posts written by creator of BART and my own experience.





Don't be shellfish...Tweet about this on TwitterShare on LinkedInShare on Google+Share on RedditShare on Facebook

Was this helpful ?