[Koha] missing circulation history (old_issues table lost 96% of records)

Benjamin Anderson benanderson.us+koha at gmail.com
Fri May 10 01:13:05 NZST 2019


Hi,

About 4 months ago we upgraded from version 3.18.05.100 to 18.11.01.000.
Just recently, our librarian let me know that the circulation history now
only has the last month or so, whereas it used to have everything since the
library began circulating books.  She is convinced that this issue was not
manifest after the initial upgrade, but only started a few weeks ago (some
months after the upgrade).  She doesn't know if it happened all at once or
incrementally.  Unfortunately, I only have db backups going back 2 days and
by the time I was alerted to the problem, those backups also were missing
the full old_issues set.  I'm not familiar with the db schema, but in
taking a look I noticed that the db snapshot from before the migration had
16,255 records:

administrator at sjbs-library-server:~$ mysql -D koha_sjbs -u koha_sjbs -e
"select count(*) from old_issues;"

+----------+

| count(*) |

+----------+

|    16255 |

+----------+


meanwhile the current db only has 598 records.  In googling, I came across
the auto increment issue, but I'm pretty sure that's what I'm dealing with
here.

Questions:

1) Any idea how we lost all these records?  Is there a configuration
setting somewhere that would explain this?  Or is something else going on?

2) Can I re-import the old_issues from the db snapshot I have with 16k rows
into the current db?  I understand this would take a little finessing
because there isn't an id in the old schema and the auto increment is on
the issues table (not old_issues).  Assuming I got all of that worked out,
is this a reasonable thing to do?

3) How do I keep more than 2 snapshots of db backups?  I'd prefer to keep a
month or so.

Thanks,
Ben


More information about the Koha mailing list