[Koha] Bulk insert with crontab.

aszomor at szomor.hu aszomor at szomor.hu
Wed Aug 8 20:46:45 NZST 2012


Dear All,

When I imported MARC records I got a warning:
$KOHAPATH/bin/commit_biblios_file.pl --batch-number 1
Use of uninitialized value $var in hash element at  
/usr/share/koha/lib/C4/Context.pm line 1026.



After I imported my records I tried to examine them and in the "Manage  
staged MARC records" form I saw the action clean possibilities of  
batches.

Can I clean batches with consloe commands ?

Attila.


#!/bin/bash
KOHAPATH=/usr/share/koha
export KOHA_CONF=/etc/koha/koha-conf.xml
export PERL5LIB=$KOHAPATH/lib
#---------
# STAGE 1 |
#---------
$KOHAPATH/bin/stage_biblios_file.pl --add-items --no-replace  
--match-bibs=1 --file /home/koha/KOHA_Datas/WebData_MARC_Records.mrc
... staging MARC records -- please wait
... processed 100 records
... processed 200 records
... processed 300 records
... processed 400 records
... processed 500 records
... processed 600 records
... finished staging MARC records
... looking for matches with records already in database
... processed 100 records
... processed 200 records
... processed 300 records
... processed 400 records
... processed 500 records
... processed 600 records
... finished looking for matches

MARC record staging report
------------------------------------
Input file:              /home/koha/KOHA_Datas/WebData_MARC_Records.mrc
Number of input bibs:    628
Number of valid bibs:    628
Number of invalid bibs:  0
Number of bibs matched:  0
Number of items parsed:  0

Batch number assigned:  1


#---------
# STAGE 2 |
#---------
$KOHAPATH/bin/commit_biblios_file.pl --batch-number 1
Use of uninitialized value $var in hash element at  
/usr/share/koha/lib/C4/Context.pm line 1026.
... importing MARC records -- please wait
... processed 100 records
... processed 200 records
... processed 300 records
... processed 400 records
... processed 500 records
... processed 600 records
... finished importing MARC records

MARC record import report
----------------------------------------
Batch number:                    1
Number of new bibs added:        628
Number of bibs replaced:         0
Number of bibs ignored:          0
Number of items added:           0
Number of items ignored:         0

Note: an item is ignored if its barcode is a
duplicate of one already in the database.


#---------
# STAGE 3 |
#---------
$KOHAPATH/bin/migration_tools/rebuild_zebra.pl -a -b -z -v
Zebra configuration information
================================
Zebra biblio directory      = /var/lib/koha/zebradb/biblios
Zebra authorities directory = /var/lib/koha/zebradb/authorities
Koha directory              = /usr/share/koha/intranet/cgi-bin
BIBLIONUMBER in :     999$c
BIBLIOITEMNUMBER in : 999$d
================================
====================
exporting authority
====================

Records exported: 0

Records exported: 0
====================
REINDEXING zebra
====================
====================
exporting biblio
====================

Records exported: 0
601....................................................................................................
Records exported: 1256
====================
REINDEXING zebra
====================
====================
CLEANING
====================

#---------
# STAGE 4 |
#---------
$KOHAPATH/bin/cronjobs/MARC21_parse_test.pl -A
# Examining marcxml from ALL biblioitems
# limit 999999, offset 0:
# MARC::Lint warnings: OFF
# Examining marcxml from ALL biblioitems
# limit 999999, offset 0:

RESULTS (number of records)...
      628 -- OK
        0 -- w/ bad marcxml
        0 -- w/ MARC::Lint warnings
        0 -- fixed from marc
        0 -- failed to fix





More information about the Koha mailing list