Our documentation is getting an overhaul! We would like your input! Click here to take a look at the beta launch of our new documentation site! Only cPanel & WHM version 82 documentation exists on our beta at this time. 84 will be added to the new site soon! Leave your feedback here: https://go.cpanel.net/docsfeedback
The cpanel_dovecot_solr_rebuild_index script - Version 82 Documentation - cPanel Documentation
Page tree
For cPanel & WHM version 82.


Skip to end of metadata
Go to start of metadata

Overview

The /usr/local/cpanel/3rdparty/scripts/cpanel_dovecot_solr_rebuild_index script rebuilds your Apache Solr™ index files if they become corrupt. This script performs the following actions:

  1. Backs up the existing index files to the /home/cpanelsolr/server/solr/dovecot/data/index/segments_1.timestamp file.

    Note:

    In this filepath, timestamp represents the file's creation date and time.

  2. Restarts Apache Solr.

  3. Reindexes all of your cPanel users' mailboxes.

Note:

  • To run this script, you must install Apache Solr. To install Apache Solr, use WHM's Manage Plugins interface (WHM >> Home >> cPanel >> Manage Plugins).
  • On systems with many user mailboxes, this script may become resource intensive and slow to complete.

The system runs the /usr/local/cpanel/3rdparty/scripts/cpanel_dovecot_solr_maintenance script nightly via cron job. This script ensures that Apache Solr runs efficiently. It optimizes your Apache Solr index files to improve searching and removes space that deleted emails use. 

This script fails when your Apache Solr index files become corrupt, which commonly occurs on resource-limited systems. For example, if you run out of disk space or inodes, Apache Solr's index files can become corrupt. If the script fails, the system sends you an email with the error and steps to troubleshoot the error.  If you troubleshoot the error and the script continues to fail, use the  /usr/local/cpanel/3rdparty/scripts/cpanel_dovecot_solr_rebuild_index script to rebuild your Apache Solr index files. 

The cpanel_dovecot_solr_rebuild_index script

To use this script, run the following command as the root user:

/usr/local/cpanel/3rdparty/scripts/cpanel_dovecot_solr_rebuild_index

Options

This script does not accept options.

Note:

The --help option will not provide help documentation. Instead, the script will run as if you did not pass an option.


For more information about Apache Solr, read dovecot.org's Solr documentation.

Additional documentation