Hi Benjamin, I cannot help you with your main issue about losing / re-importing records but I can offer a suggestion about keeping backups for longer. All I did was add a line to /usr/sbin/koha-run-backups (within the main loop, before the bit about removing old dump files) to copy the backup off-site somewhere. We use cloud-based "S3" storage for this so the command looks something like: s3cmd put $backupdir/* s3://some-namespace-here/$name or you could use scp to copy the files to some other machine. Be aware that this will accumulate a pair of files (per koha instance) each day, so you will need some way to prune the old ones out. Hope this helps, Best Regards Chris Brown On Thu, May 9, 2019 at 2:13 PM Benjamin Anderson <benanderson.us+ koha@gmail.com> wrote:
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@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 _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha