Back up - Alfresco Search Services - 2.0 - 2.0 - Ready - Alfresco - external - Alfresco/Alfresco-Search-Services/2.0/Alfresco-Search-Services/Administer/Back-up - 2025-04-04

Alfresco Search Services

Platform
Alfresco
Product
Alfresco Search Services
Release
2.0
License

There are a number of ways to back up Search Services. You can set the Solr indexes backup properties either by:

  • Editing the ‘solrcore.properties’ file
  • Using a JMX client, such as JConsole.
    Note: This feature is only available when you are using Alfresco Content Services Enterprise.

This task shows you how to specify the Solr backup directory by using the <SOLR_HOME>/solrhome/templates/rerank/conf/solrcore.properties

To set the Solr backup directory using the solrcore.properties file, set the value of the following properties to the full path where the backups should be kept after starting solr (remember to make sure it is an exsisting location and the path is the correct format depending on if uisng MAC/Windows/Linux):

solr.backup.dir=

Then stop solr and repeat the same step for each of the cores created after startup. The above path should have copied the path to the cores at creation but alfresco and archive would need to be specified for each core.

To set the Solr backup directory for each core use the <SOLR_HOME>/solrhome/alfresco/conf/solrcore.properties and <SOLR_HOME>/solrhome/archive/conf/solrcore.properties file and edit the same property as above.

Then restart solr with these properties added and then use the admin console to edit the frequency of the backup.

You can only see the Admin Console if you’re an administrator.

To edit the frequency of the backup, you can use the Cron Expression via the admin console.

  1. Launch the Admin Console.
  2. In the Repository Services section, click Search Service. You see the Search Service page.
  3. Scroll down to the Backup Settings section. Here, you can edit backup properties for each core of the Solr index: Main Store and Archive Store.
    1. Backup Cron Expression: Specifies a Quartz cron expression that defines when backups occur. Solr creates a timestamped sub-directory for each index back up you make.
    2. Backups To Keep: Specifies the maximum number of index backups that Solr should store.
  4. Click Save.

This task shows how to specify the Solr backup directory by using the <TOMCAT_HOME>/shared/classes/alfresco-global.properties file.

To set the Solr backup directory using the alfresco-global.properties file, set the value of the following properties to the full path where the backups should be kept:

solr.backup.archive.remoteBackupLocation=
solr.backup.alfresco.remoteBackupLocation=

The values set on a subsystem will mean that the property values from configuration files may be ignored. Use the solrcore.properties or JMX client to set the backup location.

If you have installed the Oracle Java SE Development Kit (JDK), you can use the JMX client, JConsole, to backup Solr indexes, edit Solr backup properties and setup the backup directory.

  • You can set the backup of Solr indexes using the JMX client, such as JConsole on the JMX MBeans > Alfresco > Schedule > DEFAULT > MonitoredCronTrigger > search.alfrescoCoreBackupTrigger > Operations > executeNow tab. The default view is the Solr core summary. Alternatively, navigate to MBeans > Alfresco > SolrIndexes > coreName > Operations > backUpIndex tab. Type the directory name in the remoteLocation text box and click backUpIndex.
  • Solr backup properties can be edited using the JMX client on the JMX MBeans > Alfresco > Configuration > Search > managed > solr6 > Attributes tab. The default view is the Solr core summary.

  • To use JMX client to setup Solr backup directory, navigate to MBeans tab > Alfresco > Configuration > Search > managed > solr > Attributes and change the values for solr.backup.alfresco.remoteBackupLocation and solr.backup.archive.remoteBackupLocation properties.
  • You may also trigger a backup with an HTTP command which instructs the /replication handler to backup Solr, for example:

      http://localhost:8983/solr/alfresco/replication?command=backup&location=&numberToKeep=4&wt=xml
    

    where:

    • location specifies the path where the backup will be created. If the path is not absolute then the backup path will be relative to Solr’s instance directory.
    • numberToKeep specifies the number of backups to keep.