LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Wednesday, August 11, 2021

Importing Bulk MARC File Via Command Line

0 comments

This blogpost is blindly adopted from the Koha Geek blog 


Load environmental variables

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


Move marc file to the directory where bulkmarcimport.pl is located.

e.g. Move a marc file from your home directory to following directory,


cp sample.mrc /usr/share/koha/bin/migration_tools

Go to the directory where import script located

cd /usr/share/koha/bin/migration_tools

Execute the following command,

perl bulkmarcimport.pl -file sample.mrc

User can import bibliographic records in a desired MARC Bibliographic Framework (e.g. BKS),

perl bulkmarcimport.pl -framework BKS -file sample.mrc

The following command will delete all existing records and install new batch of marc file.

perl bulkmarcimport.pl -d -file sample.mrc

perl bulkmarcimport.pl -framework BKS -d -file sample.mrc


Rebuild Zebra after import process finish

sudo koha-rebuild-zebra -f -v library

Information courtesy: Koha Users Group

Reference

https://perldoc.koha-community.org/misc/migration_tools/bulkmarcimport.html
http://kohageek.blogspot.com/2016/05/bulk-marc-import-using-command-line.html

No comments:

Post a Comment