[Koha] Help! Can't restore database after koha update

Gwyan Rhabyt gwyan.rhabyt at csueastbay.edu
Wed Feb 4 14:04:22 NZDT 2015


Just an update.

I solved this one. It turned out that the mysql dump wasn't restoring to
the database name that I thought it would.

Prior to update the koha database was called kohadata. I decided to change
the name to avoid confusion with a possible future database. I thought that
mysql -uroot -p koha_paclibrary < jan11dump.sql
would make sure the restored database was called koha_paclibrary, but I
didn't realize that there were multiple instructions in the header of the
jan11dump.sql file that also needed to be changed. Once I changed them, it
was restored to koha_paclibrary like I wanted.

So now the database is restored and we can see  patrons and books. There
are still some problems, but I hope to fix them by rebuilding the zebra
files.



Date: Fri, 23 Jan 2015 14:29:05 +1300
From: Chris Cormack <chris at bigballofwax.co.nz>
To: Gwyan Rhabyt <gwyan.rhabyt at csueastbay.edu>
Cc: "koha at lists.katipo.co.nz" <koha at lists.katipo.co.nz>
Subject: Re: [Koha] Help! Can't restore database after koha update
Message-ID:
        <CA+95qVSoj_wrVCgJPe6LJ1xrE_J=VywE_oVWQ8tQAFyLjus=Wg at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On 23 January 2015 at 08:02, Gwyan Rhabyt <gwyan.rhabyt at csueastbay.edu>
wrote:

> Our small school district library server needed updating (it was running
> Ubuntu 11.10 which was having problems and was no longer supported). So I
> upgraded to Ubuntu 14.04LTS and decided to upgrade Koha at the same time
> (from 3.06 to 3.18).
> The OS upgrade went smoothly.
>
> For the Koha upgrade, I did a mysqldump of the library database (I also
> backed up the complete user folder as a secondary fallback).
> I then upgraded Koha which went fine (there were a couple of fiddles on
> getting Apache2 happy, but they were documented in this group or on the
> wiki).
>
> The problem has been that I can't seem to properly restore the library
> database.
> Before the restore,Koha runs but has no books or patrons. When I looked in
> the /var/lib/mysql/koha_paclibrary folder (paclibrary is our database), I
> saw about 150 files, nearly all .frm files with a size of 12 blocks each.
> I followed the instructions at
>
>
http://kohageek.pbworks.com/w/page/60452540/How%20to%20move%20your%20koha%20database%20to%20newly%20installed%20Koha
> and
> did the following:
> sudo su
> mysql -uroot -p
> > drop database koha_paclibrary;  (response was Query OK, 178 rows
> affected)
> > create database koha_paclibrary; (response was Query OK, 1 row affected)
> > quit;
> mysql -uroot -p koha_paclibrary < jan11dump.sql (which took a few minutes,
> but returned to the prompt with no errors)
>
> Now at this point I again looked in the folder
> /var/lib/mysql/koha_paclibrary and there is only one file (db.opt) with a
> size of 4 blocks.
> I thought at first that the dump was wrong or small, but I checked and
> jan11dump.sql is 81800 blocks and looks like it has all our info inside.
>
> I tried running koha at this point on the web interface and it only gave
me
> the installer, as though koha had not been installed at all.
>
>
Are you sure it wasn't trying to upgrade your DB, when you logged into the
web installer, what did it say next?

And what message are you getting at the OPAC, the library is in maintenance
mode?

Also, if you do

mysql -uroot -p koha_paclibrary

You will be in mysql

what does
show tables;
show you?

Try
select * from items limit 10;

Do you get results?

Chris
________________________________________________
Gwyan Rhabyt

Director, Multimedia Graduate Program
Professor, Art Department
California State University East Bay
and
President of the Board of Trustees, Pacific Elementary School District


More information about the Koha mailing list