Open IT Experts for Enterprise

Configuring contentstore and SOLR indices in Alfresco 5

Cesar Capillas
Cesar Capillas

In an Alfresco setup, we find important directories under
alf_data (dir.root) in a default installation :

  contentstore         --> Alfresco binaries are located here 
  contentstore.deleted --> Alfresco binaries at the final of the deletion lifecycle
  solr4Backup          --> Alfresco Backups for SOLR indices (3 snapshots)
  solr4                --> SOLR indices

In most cases, these directories are reconfigured:

  • contentstore is a large scalable remote NFS drive, which is better
    mounted out of alf_data directory
  • contentstore.deleted may be deleted periodically via cron job safely
  • solr4 indices should be in the fastest disk as possible for better
    perfomance indexing and searching
  • solr4 indices folder should not be copied in a hot backup procedure

For example, a more suitable directory structure may be something
like this:


where /opt/data is usually a NFS mount point, and /opt/solr4 a faster
local disk. For this new setup, we have to make some changes in
Alfresco configuration according to:
In (in /opt/alfresco51e/tomcat/shared/classes)


# Contentstore

# Backup indices

Besides, we need to modify data.dir.root variable in both

  • /opt/alfresco51e/solr4/archive-SpacesStore/conf/
  • /opt/alfresco51e/solr4/workspace-SpacesStore/conf/

And finally in /opt/alfresco51e/tomcat/conf/Catalina/localhost/solr4.xml

<?xml version="1.0" encoding="utf-8"?>
<Context debug="0" crossContext="true">
  <Environment name="solr/home"        type="java.lang.String" value="/opt/alfresco51e/solr4" override="true"/>
  <Environment name="solr/model/dir"   type="java.lang.String" value="/opt/alfresco51e/alf_data/solr4/model" override="true"/>
  <Environment name="solr/content/dir" type="java.lang.String" value="/opt/alfresco51e/alf_data/solr4/content" override="true"/>
  <Environment name="solr/model/dir"   type="java.lang.String" value="/opt/solr4/model" override="true"/>
  <Environment name="solr/content/dir" type="java.lang.String" value="/opt/solr4/content" override="true"/>

With this configuration, we can make for example easier hot backups
at 5:30 AM for the new paths,

/opt/solr4Backup       --> backups by default at 2 AM and 4 AM
/opt/data/contentstore --> better an incremental or differential backup 
/opt/alfresco51e       --> tomcat config. & modules

with the corresponding dump for the database.


  • Commented parts are related to original config
  • This config is valid for Alfresco 5, with SOLR4 subsystem 

Más entradas

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *