copy data from one column to another in the same table

update `table` set `col1` = `col2` WHERE `col1` is null
Advertisements

enable Items in KOHA OAI Harvesting

in

Home › Administration › System preferences

Web services preferences

OAI-PMH

add file path  OAI-PMH:ConfFile

/etc/koha/sites/library/koha-oai.conf    with  include_items: 1 option

like that

format:
vs:
metadataPrefix: vs
metadataNamespace: http://veryspecial.tamil.fr/vs/format-pivot/1.1/vs
schema: http://veryspecial.tamil.fr/vs/format-pivot/1.1/vs.xsd
xsl_file: /usr/local/koha/xslt/vs.xsl

include_items: 1
marcxml:
metadataPrefix: marxml
metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd

include_items: 1
oai_dc:
metadataPrefix: oai_dc
metadataNamespace: http://www.openarchives.org/OAI/2.0/oai_dc/
schema: http://www.openarchives.org/OAI/2.0/oai_dc.xsd
xsl_file: /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl

include_items: 1


you may need to update the OAI

run this command

KOHA_CONF=/etc/koha/sites/library/koha-conf.xml PERL5LIB=/usr/share/koha/lib /usr/share/koha/bin/migration_tools/build_oai_sets.pl -v -i -r

koha Database Migration

 1. Backup of  old Koha databse 

mysqldump -uroot -p koha_library | xz > koha_library.sql.xz


2. Restoration of old Koha database to new koha database
   mysql -u root -p koha_library <  koha_library.sql.xz
   
3. Upgrade Database Schema
 run the command
sudo su
koha-upgrade-schema library

4. Then Rebuild the Zebra Index.

sudo koha-rebuild-zebra -v -f library

Deploying HTML, CSS webpage to Tomcat8

  1. Copy fonder /var/lib/tomcat8/webapps/ROOT to your folder.

    cp -r /var/lib/tomcat8/webapps/ROOT /var/lib/tomcat8/webapps/{yourfolder}

  2. add your htmls, css, js, in your folder.
  3. browser “http://localhost:8080/{yourfolder}”

Notes:

  1. if you using chrome web browser and did wrong folder before, then clean web browser’s cache(or change another name) otherwise (sometimes) it always 404.
  2. The folder META-INF with context.xml is needed.

KOHA Delete All biblio rcords

Log into MySQL

mysql -uroot -p

use koha_library;

Delete all bibliographic details
Run the following commands  . 

SET FOREIGN_KEY_CHECKS=0;

TRUNCATE items; 
TRUNCATE deleted_items;

TRUNCATE biblioitems; 
TRUNCATE biblio; 
TRUNCATE deletedbiblioitems; 
TRUNCATE deletedbiblio; 

Delete transactions (Issue, return)

TRUNCATE old_issues; 
TRUNCATE issues; 

Delete borrowers details

TRUNCATE borrowers; 
TRUNCATE deletedborrowers;

SET FOREIGN_KEY_CHECKS=1;

Search of Arabic records in KOha

First, Install yaz-icu package:

sudo apt-get install yaz-icu

goto /etc/koha/zebradb/etc/

Check and correct the first lines of default.idx wth this lines :

 # Traditional word index
 # Used if completenss is 'incomplete field' (@attr 6=1) and
 # structure is word/phrase/word-list/free-form-text/document-text
 index w
 completeness 0
 position 1
 alwaysmatches 1
 firstinfield 1
 icuchain words-icu.xml
 
 
 # Phrase index
 # Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1)
 # and structure is word/phrase/word-list/free-form-text/document-text
 index p
 completeness 1
 firstinfield 1
 icuchain phrases-icu.xml 

In the same folder modify or create words-icu.xml with:

 <icu_chain locale="ar">
   <transliterate rule="\'>\ "/>
   <transliterate rule="[:Number:] { '-' >  "/>
   <transform rule="[:Control:] Any-Remove"/>
   <tokenize rule="l"/>
   <transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/>
   <transform rule="NFD"/>
   <transform rule="[:Nonspacing Mark:] Remove"/>
   <transform rule="NFC"/>
   <transliterate rule="{ الا > ا "/>
   <transliterate rule="{ الأ > أ "/>
   <transliterate rule="{ الإ > إ "/>
   <transliterate rule="{ الآ > آ "/>
   <transliterate rule="{ الب > ب "/>
   <transliterate rule="{ الت > ت "/>
   <transliterate rule="{ الث > ث "/>
   <transliterate rule="{ الج > ج "/>
   <transliterate rule="{ الح > ح "/>
   <transliterate rule="{ الخ > خ "/>
   <transliterate rule="{ الد > د "/>
   <transliterate rule="{ الذ > ذ "/>
   <transliterate rule="{ الر > ر "/>
   <transliterate rule="{ الز > ز "/>
   <transliterate rule="{ الس > س "/>
   <transliterate rule="{ الش > ش "/>
   <transliterate rule="{ الص > ص "/>
   <transliterate rule="{ الض > ض "/>
   <transliterate rule="{ الط > ط "/>
   <transliterate rule="{ الظ > ظ "/>
   <transliterate rule="{ الع > ع "/>
   <transliterate rule="{ الغ > غ "/>
   <transliterate rule="{ الف > ف "/>
   <transliterate rule="{ الق > ق "/>
   <transliterate rule="{ الك > ك "/>
   <transliterate rule="{ الل > ل "/>
   <transliterate rule="{ الم > م "/>
   <transliterate rule="{ الن > ن "/>
   <transliterate rule="{ اله > ه "/>
   <transliterate rule="{ الو > و "/>
   <transliterate rule="{ الي > ي "/>
   <display/>
   <casemap rule="l"/>
 </icu_chain>

(note that searching for other locales will still work even if you have your locale set to ar)

If you are using packages, run:

 sudo koha-restart-zebra {yourinstance}
 sudo koha-rebuild-zebra -f {yourinstance}

(replacing {yourinstance} with the name of your instance)

If you are using a tarball installation or git installation (in which case you will need to change all the paths) execute now these two lines:

 /etc/init.d/koha-zebra-daemon restart
 /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r -v -w