Installation How-To: Configure Automated Incremental update for Linux

How To Configuring Automated Indexing 

Most installations will require the system automatically refresh the index on a periodic basis. This how-to will discuss configuring an automated refresh on RHEL Linux 6.x. on a periodic basis using standard cron jobs in Linux.


It is assumed that the system has been properly set up and validated

  • A full initial index has been created.
  • Experienced knowledge of Linux, and cron
  • Knowledge of how often the Agile data changes significantly enough to require a refresh.
  • Cron is installed and working. 

Things to Consider

The creation of a index can take place while the application is running on the current index

Choose a time to update the index when it will be least disruptive to users. User will be LOGGED OUT when the new data is made available.

Impact on the Agile server - during extract additional load will be put on Agile take this into consideration. The load is generally very small - however large change sets may have an impact.

What the Process Does

The following process will execute a single script on a given schedule that executes in sequence the following:

1) Incrementally extract and produce a new up to data AX index based on the changes in agile.

2)  Stop the Application Server

3) Restart the application server with the new index.


Create or copy the following script to a location of your choice. This script will be referred to as "" for the rest of the how-to.



indexcommand="${axhome}/etl/ etl-config-incremental.xml"




cd $axhome/etl

echo " REINDEX $(date -u) ------- STARTING REINDEX --------"

echo " REINDEX $(date -u)    Calling Incremental:  ${indexcommand}" 


echo " REINDEX $(date -u)        Stopping AX:  ${stopcommand}"

cd $axhome/cli


echo " REINDEX $(date =u)     Sleeping for 15 seconds"

sleep 15

echo " REINDEX $(date -u)         Starting AX:  ${startcommand}" 

cd $axhome/cli

echo " REINDEX $(date -u) PWD = $(pwd) "



echo " REINDEX $(date -u) --------- REINDEX COMPLETE --------"  


Update the Script

The variable $axhome  will refer to the installation directory of your AX software. Update this to point to your location. Next make the script executable

> chmod +x

Test the Script

During a time that wont disrupt your users, or on a development environment execute the script directly. The script will do the following things:

1) Incrementally extract new items from your Agile instance

2) Rebuild  a new index

3) Stop the application

4) Swap in the new index

5) restart the application

Monitor the output  When the script completes it will say "REINDEX COMPLETE"

most common issues when troublshooting will be relative paths to the scripts being called, and possibly file permmissions. 

Configure Cron

The following assumes (and is a good practice) that AX is running as a non-root user - the following assumes a user named "ax". The following cron configuration will be a user-level cron job, and will not be executing at root.  Please refer to the cron man-page for specific of cron,  the following example will execute the job 1 time per day.

edit the crontab:

> crontab -e

Make the following entry and save the file, modify this entry to match the full path of your, the following assumes its available in the ax users home directory. Additionally it writes the log to the ax home directory as well. 

30 3 * * * /home/ax/ >> /home/ax/reindex.log

Next monitor the  system cron log files to verify the system is working:

tail -f /var/log/cron

Further Steps

Weekly full reindex - This may be a good thing todo as a matter of practice. The exact same steps can be used to create a weekly task.  The only difference is to edit the "indexcommand" to use the full indexer vs the incremental change the following:

indexcommand="${axhome}/etl/ etl-config-incremental.xml"

To the full index command:

indexcommand="${axhome}/etl/ etl-config.xml"





Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk