Koha How-To

Taking Koha on the road

We recently got a question from one of our partners, asking about methods for “taking their catalog with them” to places that did not have an Internet connection. (I know, it’s horrifying to think that such places exist. I’ve been in a few lately, and it was awful.) Now in this case, the specific need was met with a simple database extract of the authors, titles and basic publication data, loaded into a spreadsheet. But what if you wanted more? What if you wanted something closer to a fully searchable copy of your Koha catalog? Well, that’s easy. You install Koha on a laptop and import a MySQL dump of your Koha database. Since (nearly) every setting in Koha is in the database, importing your database into a clean install of Koha will give you a nearly identical, but stand-alone, copy of your system.

My preferred method for installing Koha, on anything other than a machine dedicated for that purpose, is to do so in a Virtual Machine (VM). One reason as that with a VM, you can use Debian Linux, the *best* operating system for Koha, without having to alter or give up whatever OS you have on your desktop/laptop. (An added advantage is if you haven’t played around with Linux yet, installing Debian in a VM gives you an excellent excuse to start.) You also get the advantage of isolating the Koha “server” from the rest of your applications, only turning it on when you need it, and at all other times it takes up no resources other than some disk space. Another advantage is VMs can be exported and imported, so once you’ve created it, you can easily move or copy it to another laptop or desktop, without having to reinstall anything other than the Virtual Machine application.

I had intended to use this blog post to give some instructions on using a Virtual Machine application, such as VirtualBox or VMware, to create a Debian VM, and then installing Koha on it. However, I don’t need to. There is already a very good article on doing just that on the Koha Community Wiki, at http://wiki.koha-community.org/wiki/Setting_Up_Koha_in_Virtual_Environment_%2B_Using_That_as_a_Development_Environment (kudos to Reed Wade for writing it). If you’re interested in installing Koha on a VM, this is a great place to start.

I will make a couple of comments on the wiki article. The author talks about using QEMU/KVM as the VM application, but that was developed for Linux, and I’m not sure how robust it is on Windows or Macs. I still use VirtualBox myself, and am fairly pleased with it (for the moment). Lifehacker.com has an excellent beginner’s guide to using VirtualBox at http://lifehacker.com/5204434/the-beginners-guide-to-creating-virtual-machines-with-virtualbox. It’s a bit dated, but should still provide a good introduction.

My other comment about this wiki article is that the author talks about using the package method for installing Koha. This is fine if all you need is a working copy of your Koha installation. (If you want to do customizations or tinkering with the code, you will want to use the git method.) If you intend to import a copy of your actual production database, you can skip the step where you’re instructed to run the Web Installer. After you’ve run the koha-create, all you need to do is import the mysqldump of your database and rebuild the indexes. (Note – To import the database you’ll need the MySQL database name, user and password, which are created by the koha-create command. You can see what they are by looking at /etc/koha/sites/<the_site_name_you_provided_to_koha-create>/koha-conf.xml.)

That’s the basics. You may not need it often, but when you do, having a copy of your Koha with you can be very helpful.

Caveat – Such a copy should be used for reference, development, or entertainment purposes only (in other words, it’s static), and not as “backup” if your production system goes down. While it’s relatively easy to get a full copy of your database from production to a stand-alone machine, it is very difficult to move particular transactions from the stand-alone back to the production. That’s what the offline circulation tools are for. So just remember, this is just a *copy*.

Read more by Larry Baerveldt

Tags koha support