Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
administration:automation [2018/12/19 17:19] – demiankatz | administration:automation [2022/10/13 14:16] – [Automation] demiankatz |
---|
* Update VuFind's index with the latest changed and added records from your ILS. See the [[indexing:marc:export_notes|MARC Export Notes]] for help with this. | * Update VuFind's index with the latest changed and added records from your ILS. See the [[indexing:marc:export_notes|MARC Export Notes]] for help with this. |
* Remove deleted and suppressed records from VuFind's index. VuFind is packaged with tools in the util directory that can help with this, but functionality may be limited depending on the capabilities of your ILS. | * Remove deleted and suppressed records from VuFind's index. VuFind is packaged with tools in the util directory that can help with this, but functionality may be limited depending on the capabilities of your ILS. |
| * Remove expired data from VuFind's database (see documentation for the various "expire"-related [[administration:command_line_utilities|Command Line Utilities]] for more details). |
* You may wish to make sure the Solr index is regularly optimized for minimal space usage and improved performance, though this is not as important for newer versions of Solr as it used to be. However, optimization can be a good way to ensure that all uncommitted changes become visible. There is a stand-alone optimize tool in the util directory. | * You may wish to make sure the Solr index is regularly optimized for minimal space usage and improved performance, though this is not as important for newer versions of Solr as it used to be. However, optimization can be a good way to ensure that all uncommitted changes become visible. There is a stand-alone optimize tool in the util directory. |
* Dump the MySQL database for backup purposes. | * Dump the MySQL database for backup purposes. |
If you need to automate tasks under Linux, you will want to become familiar with the cron process. This allows you to schedule programs to run at specific intervals, either as root or as a particular user. The details of using cron are beyond the scope of this document, but there are many helpful resources available elsewhere. The [[http://en.wikipedia.org/wiki/Cron|Wikipedia page on the subject]] is probably a good starting point. | If you need to automate tasks under Linux, you will want to become familiar with the cron process. This allows you to schedule programs to run at specific intervals, either as root or as a particular user. The details of using cron are beyond the scope of this document, but there are many helpful resources available elsewhere. The [[http://en.wikipedia.org/wiki/Cron|Wikipedia page on the subject]] is probably a good starting point. |
| |
=== cron-friendly VuFind script === | === cron-friendly Solr script === |
| |
If you try to run the standard vufind.sh script to restart VuFind from within cron, you may run into problems. The context in which VuFind runs may be wrong, and the attempted output to the TTY may cause unexpected failures. If you have trouble, try adding this script (you can call it vufind_cron.sh) to your VuFind home directory: | If you want to restart VuFind's Solr instance via cron, the best thing is to set it up as a system service that can be restarted with systemctl or an equivalent command. See [[administration:starting_and_stopping_solr#running_solr_automatically|Running Solr Automatically]] for details on how to set up Solr as a service. |
| |
<code bash> | |
#!/bin/sh | |
| |
# Disable JETTY_CONSOLE output -- it causes problems when run by cron: | |
export JETTY_CONSOLE=/dev/null | |
| |
# Pass parameters along to vufind.sh: | |
CURRENTPATH=`dirname $0` | |
cd $CURRENTPATH | |
$CURRENTPATH/vufind.sh $* | |
</code> | |
| |
Important: Note that because of the way CURRENTPATH is determined, this script only works if it is in the same directory as vufind.sh! | |
| |
=== Why restart VuFind? === | === Why restart VuFind? === |
| |
The main reason to regularly restart the VuFind is to ensure system stability. Due to the way Java garbage collection works, Solr can eventually run out of memory and stop responding; periodic restarts are an easy way to avoid this problem. It is also a good idea to investigate [[administration:performance#java_tuning|Java tuning]] to address the root cause -- but even with a well-tuned system, occasional restarts (such as, on a weekly basis) can help ensure long-term stability. | The main reason to regularly restart the VuFind Solr instance is to ensure system stability. Due to the way Java garbage collection works, Solr can eventually run out of memory and stop responding; periodic restarts are an easy way to avoid this problem. It is also a good idea to investigate [[administration:performance#java_tuning|Java tuning]] to address the root cause -- but even with a well-tuned system, occasional restarts (such as, on a weekly basis) can help ensure long-term stability. |
==== Using mysqldump ==== | ==== Using mysqldump ==== |
| |
</code> | </code> |
---- struct data ---- | ---- struct data ---- |
| properties.Page Owner : |
---- | ---- |
| |