Warning: This page has not been updated in over over a year and may be outdated or deprecated.
administration:automation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
administration:automation [2015/12/14 19:09] – ↷ Page moved from automation to administration:automation demiankatz | administration:automation [2022/10/13 14:13] – [Using cron] demiankatz | ||
---|---|---|---|
Line 20: | Line 20: | ||
If you need to automate tasks under Linux, you will want to become familiar with the cron process. | If you need to automate tasks under Linux, you will want to become familiar with the cron process. | ||
- | === cron-friendly | + | === cron-friendly |
- | If you try to run the standard vufind.sh script | + | 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=/ | + | |
- | + | ||
- | # Pass parameters along to vufind.sh: | + | |
- | CURRENTPATH=`dirname $0` | + | |
- | cd $CURRENTPATH | + | |
- | $CURRENTPATH/ | + | |
- | </ | + | |
- | + | ||
- | Important: | + | |
=== Why restart VuFind? === | === Why restart VuFind? === | ||
- | The main reason to regularly restart the VuFind is to ensure system stability. | + | The main reason to regularly restart the VuFind |
- | + | ||
- | 1. Modify | + | |
- | + | ||
- | < | + | |
- | JAVA_OPTIONS=" | + | |
- | </ | + | |
- | + | ||
- | 2. Create and cron a script that searches this log for the word Full. If it finds it, the GC has failed and it is only a matter of time before vufind bonks. | + | |
- | + | ||
- | < | + | |
- | if [[ $(grep | + | |
- | exec / | + | |
- | fi | + | |
- | </ | + | |
- | + | ||
- | (File paths may need to be adjusted to match your own system). | + | |
==== Using mysqldump ==== | ==== Using mysqldump ==== | ||
Line 351: | Line 320: | ||
* As with the previous script, you need to have SSH keys set up so that SFTP can transfer files automatically. | * As with the previous script, you need to have SSH keys set up so that SFTP can transfer files automatically. | ||
* You'll need to customize some variables to match your local setup. | * You'll need to customize some variables to match your local setup. | ||
- | * When using VuFind 1.x, be sure you run this script a significant amount of time AFTER the update script listed above. | ||
<code bash> | <code bash> | ||
Line 488: | Line 456: | ||
</ | </ | ||
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
administration/automation.txt · Last modified: 2023/03/06 20:48 by demiankatz