Vue normale

Reçu avant avant-hier

Search for data inconsistencies

Par :Vimal
30 décembre 2023 à 10:54

 


It's a script which searches for data inconsistencies.  The result shows the following inconsistencies in data;

items without a home or holding library
items without item type or with invalid item type
bibliographic records without item type or with invalid item type
bibliographic records with invalid MARCXML
bibliographic records without biblionumber or biblioitemnumber in MARCXML
bibliographic records without title
invalid values in fields where the framework limits to an authorized value category
authority records without authority type or with invalid authority type
patrons who are too old or too young for their category

The above-mentioned inconsistencies create problems in circulation and cataloguing searches.

Apply the following commands individually to get the information on data inconsistencies.

Load environmental variables

sudo su
export PERL5LIB="/usr/share/koha/lib"
export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml"

Enter into the folder where the data inconsistencies script is located.

cd /usr/share/koha/bin/maintenance

Apply the command to run the script.

./search_for_data_inconsistencies.pl

Reference 

Backup with auto delete old files

Par :Vimal
26 août 2021 à 03:50


Auto-deletion of old backup files helps save cloud space.

Here is a shell script to schedule the backup with a time stamp. It keeps three days of backup and deletes previous files to save space. This method is convenient for working with cloud storage with limited space (e.g. Dropbox). 
Follow the instructions below to schedule the backup.

Download the shell script

Copy the shell script to the home folder. Open the shell script and make changes to the Koha database, username, password and location of the backup. The timestamp of the database also appears on the backup file name. Give the number of days the backup keeps.

Move the shell script to /usr/local/bin

sudo cp backup.sh /usr/local/bin

Give the necessary permission to the shell script,

cd /usr/local/bin
sudo chmod +x backup.sh
sudo chown "$USER:$USER" backup.sh
sudo chmod 700 backup.sh

Create the cron job entry for the backup. Apply the following command on the terminal.

export EDITOR=mousepad
crontab -e

Copy the lines below to the bottom part of the crontab file.

#Koha backup
10 20 * * * /usr/local/bin/backup.sh

Change the timing of the backup. Here, backup takes at 8:10 PM.

❌