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

11 comments:

  1. Dear Vimal Jee,
    I have installed koha fresh. Is it mandatory run the following command line perl bulkmarcimport.pl -d -file sample.mrc mentioed by you. Beacause when i run this command it creates records having no item.

    Very useful guidance.

    thanks
    RK Jena, SPA Bhopal

    ReplyDelete
    Replies
    1. Sir,
      You can import using GUI.
      Tools > Stage MARC Records for Import

      Delete
  2. Is there any command or build index that make only one catalogue to four same title

    ReplyDelete
  3. Dear Sir,
    Using GUI (Tools > Stage MARC Records for Import) I'm importing marc file with 9 entries(5 same title + 4 same title) with unique barcode for each. But it import 9 records and 63 items in catalogue instead of 9 items.
    Below are the marc file fields that i included in my marc file.

    082$2
    100$a
    100$c
    245$a
    250$a
    260$a
    260$b
    260$a
    300$a
    521$b
    760$b
    942$c
    952$p
    952$2
    952$a
    952$b
    952$d
    952$w
    952$y

    Plz help me. Thanks in advance

    ReplyDelete
    Replies
    1. The problem with MARC conversion.
      Item information in 952 split into various items.

      Delete
  4. thanx for sharing such a valuable information. It really helped me in creating a perfect bibliography

    ReplyDelete
  5. Dear Mr. Vimal,

    Please confirm me should I export environment variables whenever I do bulkimport.pl.

    Thanks
    Yesan
    Chief Librarian
    SAIACS, Bangalore

    ReplyDelete
    Replies
    1. Exporting environment variables is essential.

      Delete
  6. sir, pls give suitable MARC file field for this (field in my database) AccNo, AccDate, Title, Author1, Author2, Author3, Publisher, Year, ClassNo, BKno, Vol, Series, Page, Price, Edition.

    Pls help me, thanks in advance

    ReplyDelete
    Replies
    1. AccNo 952$p
      AccDate 952$d
      Title 245$a
      Author1 100$a
      Author2 700$a
      Author3 700$a
      Publisher 260$b
      Year 260$c
      ClassNo 082$a
      BKno 082$b
      Vol 952$h
      Series 490$a
      Page 300$a
      Price 952$g
      Edition 250$a

      Delete
  7. This comment has been removed by the author.

    ReplyDelete