Monday, April 29, 2013

Database Backup

http://www.mattpaulson.com/wp-content/uploads/2011/11/backup.jpg
Ok, let me just jump to the point.  Currently, I was ordered to perform database backup for library system. Backup database will be kept at the organization's cloud server. To be honest, I have no experience carry out such task. All I know is database dump and execute, import export, just that. I'm excited accepting the task but at the same time, I am nervous to the limit. Fuh~~~

There are three components :
1. Full Backup
2. Incremental Backup
3. Replication Server

I'm not sure whether they give me a specific due date or not, but I'm very sure that they want it to be done soon, as fast as I could.

Till now, I have successfully do the first one, full backup. Copy whole database from server A and send it to backup server, server B. All this has to be put in cron, so that it will be done automatically. Along the process, I've learn about scp, ssh private/public key. That is something new for me which I'm glad to learn. I will try my best to share it here later.

Striving to pursue my journey to complete task 2 and 3.

P/s : | O | X
        Undilah saya calon anda!

Saturday, April 27, 2013

How can I speak with more confidence in meetings?

 http://www.pinellascounty.org/mpo/images/meeting1.jpg

It is difficult. What to say, when to say it and how to say it. But there is a great rules which I think will help. It's :

1- Turn Up 
2- Listen
3- Speak your truth.
4- Don't be to attach to an outcome

Turn Up
Means more than just get there. It means be present, be ready. Know what people want from you, know what you want from them.

Listen
Really pay attention. The best speakers are always the best listener. 

Speak your truth
Speak from your heart. You need to be concise. And you need to really say what for the common good.

Don't be attach to an outcome
Know what you want then be really flexible about how to get there. Its really influential. 





P/s : Preparing myself for the upcoming meeting.

Friday, April 26, 2013

Tips : Catalog search returns "No results found"

Entri ini adalah susulan entri sebelum ni. Seperti yang pernah dikongsi pada entri lepas, the only reason that I know yang menyebabkan carian katalog tidak berfungsi ialah Zebra. Samada zebra stopped or reindexing is in the process.

Tapi hari ni dapat lagi ilmu baru.

Pagi ini lebih kurang pukul 800 pagi, (holiday) I purposely try make a search on OPAC. Dengan niat nak menyiasat apa masalah sebenarnya berikutan masalah carian yang dilaporkan oleh En.Azizi beberapa hari yang lepas.

Surprisingly, Opssss..... it is not functioning. No results found. Oh my GOD. Berderap darah. Ok, cool. If this happen because indexing is in the process, then I should wait a few minutes, try again and should be fine. I gave myself 15 minutes (more than enough). Then, another try.

NO RESULTS FOUND

Ok, relax-relax. Second hope, manually do the indexing. This would take around 10-15 minutes, after that case usually settled. However, the process take longer than 15 minutes. Now, I know there is something else. This is not the solution. I patiently wait till the end of the process. Almost 2 HOURS. Disaster. I'm in a great problem. What is even sadder, again.... catalog search returns : "No results found". 

http://thumbs.dreamstime.com/thumblarge_239/1203429807ZMwX6g.jpg 

The face of chief librarian comes straight into my head. He just warn me yesterday not to do anything to the server on the coming Sunday because there will be a visit from MQA to check library system. Sir, I did nothing to the server since our conversation on this matter. Honestly. How scared I am at that time. Having no team-mate. All alone.

Nasib la harini Jumaat, perpustakaan tutup. Tapi esok pihak perpustakaan dah mula operasi dan lusa MQA datang. Meaning I have only today. Fuhh.... Jika dan hanya jika harini adalah hari bekerja, pasti bertalu-talu sms dan panggilan masuk. Thanks Ya Allah. 

I'm struggling to resolve this matter as soon as possible. Ok, to make long story short, here is the tips.

1. Restart apache
2. Restart mysql
3. Restart zebra

Ensure these three components can be restart successfully. If errors shown, fix that. In my case, the root problem is apache : "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName". Click here to see how I solve that.

Alhamdulillah.... masalah selesai ! Dekat pukul 1 tengahari jugaklah baru dapat tarik nafas lega.

Proud to be myself. Bangga wooo boleh settle masalah sengsorang!!! Ok, sila lempang.. :P With Allah guidance *_^

 

Awas ! Zebra melintas di hadapan.


Entri ni just nak men'nota'kan kepeningan + kehairanan + ketaktaupasai-apaan je.  Of coz la pasal KOHA.

Yang pertama. Dua hari lepas... dalam pukul 430 pm camtu, I've received an email from En.Azizi. He reported that something wrong with Fast Add Cataloguing. Dah baca tu cuak tak usah cakap la.. I just wonder what happened, why and how to fix the situation.

I tried. Eh... ok je. Then, try again... Still..... nothing weird, no problem. Ponder. Did I miss understood the problem reported??? Read again. Nope... i'm right. Then reply the email, saying that everything were just fine while deep down in my heart hoping that it is their fault. Doing it not in the order it supposed to be. Because i'm very sure that is nothing wrong with the system. Hope! Then I leave.

The next day, early in the morning an SMS touch my inbox. From our librarian. I know it must be a serious problem if it were from this guy. Mengucap siap2. Then read the message.

"Atun, carian lansung xjalan dari kemarin"

Whaaaaaaat? Is it ? Quickly trying make a search on the web. Leave my cup of Nescafe aside. I've got the search result. Another search.... perfect! Next try... great!  Yesterday I was frequently tested the catalog search. I didn't face any problem.

Rasa macam mau hantok kepala ke meja. What is going on?

Stop. Think. Ponder. The only reason which makes catalogue search stop is indexing. We're using zebra indexing. It takes around 10 minutes per reindexing. If only searching made while system reindex, there you see search failure. That is the only reason that I know. Yea.. I'm sure. Message replied.

Few minutes later, a message from En.Azizi received.

"Ok, carian dah boleh dah."

I said to myself : zebra dah melintas sampai ke tepi la tu. Kemudian, balas mesej ambik kesempatan tanya berkenaan fast add cataloguing. He said still... tak jadi. Utk kes ni sama sekali takde kaitang dengan zebra. Sure!. Waktu ni terbayang pintu ajaib Doraemon. Niat je nak ke mana-mana then masuk ikut pintu ajaib tu. Kalaulah ada... nak niat balik mergong p bangunan library. Nak tengok sendiri apa yang tak jadinya. Tp.. itu semua KALAU......

I've decided. Ok lah... I'will make a manual screenshot for them just to ensure that they are doing in the right steps. Sedang elok mengarang... received another message.

"Atun, dah ok dah".

Grrrr~~~~~ Sabo-sabo.... Istighfar bebanyak... Ada ilmu Allah nak bagi tu...

OK, I shouldn't let my zebra crossing the road during working hour. Ia akan mengganggu pengguna jalan.
Previous setting in cron, reindex for every hour. Tukar, sehari sekali je... at 1.00AM. Tak kacau sapa dah kot waktu tu. kalau ikut KOHA punya recommendation lagi la... setiap 10 minit sekali. Tak jalan-jalan la jawab dia.

I need to tell them about this. Setuju atau tak, I leave it to them.

OR.... is it my mistakes which I don't know, I don't realize that it is a mistake.  Kalaulah betul.. moga cepat sedar diri! Wahai Allah yg maha tahu.. ajarkan aku ilmu sepatutnya supaya dapat mempermudahkan pihak library. Ameen.

Thursday, April 18, 2013

Query XML data type : SOLUTION


What a blessed morning today.. All praises due to Allah.. ^_^

Click here to read previous entry on query XML data type and what drive me to that. So, without further delay, here is the solution :





See??? As simple as that. The key is EXTRACTVALUE().

I'm proudly declare, that I'm ready for any type of reports they want me to generate. Oh... how I wish I could find this earlier... It's OK. Better late than never. Keep learning.. ;) 

Wednesday, April 17, 2013

Query XML data type

First, let me share the background story. Books were written in various language. In our library, there are book in Malay, Arabic, English and etc. The most is Arabic I think. The information of a book such as title, author, ISBN, barcode, language, subject, call number and so on were kept in MARC. MARC is Machine Readable Catalog. I will share on MARC later. MARC were kept in database in a field with longtext data type in an XML format.

 So, my task is to generate a statistic based on item's language.

  

I did successfully produce the statistic by manipulationg some PHP pre-defined function such as explode.. *_*

  

However, when it comes to huge data for example statistic for every item in the library (currently our library hold more than 50 000 items and a lot more thousands to come ) .... it stop!!! :( 

To access more than 50 000 MARCs just to get that tiny info each. Huh.... I know it must  a better and clever way to do it precisely and most important is the query performance. I'm keen to know 'how to query XML data type' even I'm not sure does it really help. At least I try. Once I got the solution, I will definitely paste it here.. 

Ok.. work hard, pray a lots..

Monday, April 15, 2013

Overdue Item that aren’t yet overdue


Currently we are using KOHA version 3.10. Previous version used is 3.06.

Problem reported :
Tarikh hari ini jadi "Over Due". Sepatutnya tarikh selepas itu iaitu esok.
 

Cause
 
 
 
Solution
I'm not sure whether this is the right solution. The ideas are :
  1. Update data type for field date_due from date to datetime
  2. Update records for date_due >= today, set the date as it is plus time 23:59 (Just to rectify existing records with 00:00 time. Dont bother about record with date_due < today, they are no doubt overdue.)
  3. Done



As for now, it works well. The following incoming record will automatically record date_due in datetime format.

Alhamdulillah. Case settle! Yeayy... lompat bintang.... ;P