Monday, July 25, 2022

Bulk marc import using command line

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 folder where bulkmarcimport.pl is located.


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


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


Go to the folder 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


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

No comments:

Post a Comment