[Koha] delete content of a biblio instance

rogan.hamby at gmail.com rogan.hamby at gmail.com
Wed Jul 8 05:44:28 NZST 2020


Those are commands to run from a MySQL command prompt.

SET FOREIGN_KEY_CHECKS = 0;  basically turns off FK integrity so it should
always be used carefully and on a live system only as a last resort. The
truncates cleanout tables and the last one turns the FK checks back on.

Every rare now and then in a migration, I may use this if I've loaded bibs
and items and want to reload them before other loading is done.

On Tue, Jul 7, 2020 at 1:32 PM Heinz-Jürgen Oertel <hj.oertel at t-online.de>
wrote:

> Am Dienstag, 7. Juli 2020, 17:55:20 CEST schrieb rogan.hamby at gmail.com:
> > Well, it depends.
>
> to your first question. It is not a used running system yet. I just used
> it to
> get familiar with it. The first import in a new biblio was not successful,
> not
> the correct import data used. Now I like to empty it and import a new
> export
> from another system.
>
> > If you only have bibs and items loaded this should work:
> >
> > SET FOREIGN_KEY_CHECKS = 0;
> > truncate biblio;
> > truncate biblioitems;
> >
> > truncate items;
> > truncate auth_header;
> > truncate sessions;
> > truncate zebraqueue;
> > truncate biblio_metadata;
> > SET FOREIGN_KEY_CHECKS = 1;
>
> I assume that are all data base commands to the biblio data base?
>
> > However, if you've had this as a living system with transactions you will
> > also need to look at cleaning out a lot of other tables such as
> statistics,
> > issues, etc....
>
> see above.
>
> Thanks and Greetings
>     Heinz
>
> >
> >
> > On Tue, Jul 7, 2020 at 11:17 AM Luis Moises Rojas <
> lmoisesrojas at gmail.com>
> >
> > wrote:
> > > Hi,
> > > That was my question a few days ago, and there is no way.
> > >
> > > I don't know if there is any answer now
> > >
> > > El mar., 7 de jul. de 2020 9:40 AM, Heinz-Jürgen Oertel <
> > >
> > > hj.oertel at t-online.de> escribió:
> > > > Hello
> > > >
> > > > I'm looking for a way to delete the complete content of a biblio
> > >
> > > instance,
> > >
> > > > not
> > > > the instance itself in order to keep "Item types", "Patron
> categories"
> > >
> > > etc.
> > >
> > > > Any hint is very welcome. After deleting the content,, I want to
> import
> > > > new
> > > > data via marcxml import.
> > > >
> > > > Greetings
> > > >
> > > >         Heinz
> > > >
> > > > _______________________________________________
> > > >
> > > > Koha mailing list  http://koha-community.org
> > > > Koha at lists.katipo.co.nz
> > > > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
> > >
> > > _______________________________________________
> > >
> > > Koha mailing list  http://koha-community.org
> > > Koha at lists.katipo.co.nz
> > > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
>
> --
> mit freundlichen Grüßen aus Halle (Saale)
>        Heinz-Jürgen Oertel
>
>
>


More information about the Koha mailing list