Configuring contentstore and SOLR indices in Alfresco 5

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

/opt/alfresco51e
/opt/alfresco51e/alf_data
  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:

/opt/alfresco51e
/opt/data
  contentstore
  contentstore.deleted
/opt/solr4Backup
/opt/solr4

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 alfresco-global.properties: (in /opt/alfresco51e/tomcat/shared/classes)

dir.root=/opt/alfresco51e/alf_data

# Contentstore
dir.contentstore=/opt/data/contentstore
dir.contentstore.deleted=/opt/data/contentstore.deleted

# Backup indices
solr.backup.archive.remoteBackupLocation=/opt/solr4Backup/archive
solr.backup.alfresco.remoteBackupLocation=/opt/solr4Backup/alfresco 

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

  • /opt/alfresco51e/solr4/archive-SpacesStore/conf/solrcore.properties
  • /opt/alfresco51e/solr4/workspace-SpacesStore/conf/solrcore.properties
#data.dir.root=/opt/alfresco51e/alf_data/solr4/index
data.dir.root=/opt/solr4/index

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"/>
</Context>

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.

Notes:

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

Más entradas de blog

thumbnail

Añadir comentarios