Rebuild Indexes

Michael Schwartz (PC Support & Services) filepromike at gmail.com
Tue Jan 7 14:48:13 PST 2020


>  Hi!  What is an easy way to rebuild all indexes?  (running this from a
> menu is okay for now)
> 
> We are running filePro 5.8 on Linux (CentOS 6.10).
> 
> Eventually, I would like to automate this process from the command line if
> possible.
> 
> Thanks,
> Ross
> 
> I found the following:
> http://mailman.celestial.com/pipermail/filepro-list/2016-
> January/032416.html
> 
> echo "Started `date`" >/home/mjs/retime
> cd /u/appl/filepro
> for file in *
>      do echo $file
>         if [[ -d $file ]]; then
>                 echo "Starting Freechain:" $file `date` >>/home/mjs/retime
>                 /u/appl/fp/lib/freechain $file
>                 echo $file `date` >>/home/mjs/retime
>                 /u/appl/fp/dxmaint $file -ra -e
>         fi
> done
> echo "Ended `date`" >>/home/mjs/retime

      That's not a bad script to start with.  Of course, I'm prejudiced
because I wrote it...  <grin>
    
       It rebuilds the freechains and *ONLY* the automatic indexes.  (You
have to rebuild demand indexes manually...)  

       All the paths are hard-coded, so change it to suit your needs.  I
start with that and edit it for each of my customers as needed.  

      Of course, it needs to be run when all your users are out of the
server and preferably immediately after a system reboot, so that all the
lockfiles are removed.  

Enjoy!

Mike Schwartz 




More information about the Filepro-list mailing list