We have provided commands for the most important command line actions for package users, but there are yet several important commands which require calling the .pl file directly. The commands provided by the packages take into account the location of koha-conf.xml and perl files for the instance provided or detected, but do not seem to use the environmental variable KOHA_CONF and PERL5LIB directly. As a result it seems that the Debian/Ubuntu packages do not presently set up these environmental variables. On package installs executing the commands not yet provided for requires manually setting these variables. For instance, when trying to run the cleanup_database.pl utility on a package install it will fail because KOHA_CONF is not specified. To allow it to work one must manually set this variable. I propose the creation a command for the package installs called "koha-cleanup-database" which will avoid the use of environmental variables, but provide for package users the ability to cleanup their databases. I propose this utility because of its value -- we have been cataloging a 40,000 volume library and from all the z39.50 searches our database had reached over 1.5 GB. On the non-package install we cleaned up the database down to only 120 MB by removing the old z39.50 searches and the whole setup is much more stable and fast. Upgrading to a package install on a new server, we have lost this functionality.
Hi Ian, koha-cleanup-database is supposed to be run as a daily cronjob and normally not run manually. If you look into your cronjob configuration you can change the options it's run with to fit your library's needs and clean up the z39.50 imported records regularly. There is also a tool that helps to run any of the scripts from command line - it sets up all the right environment variables for you: https://wiki.koha-community.org/wiki/Commands_provided_by_the_Debian_packages#koha-shell
(In reply to Katrin Fischer from comment #1) > Hi Ian, > > koha-cleanup-database is supposed to be run as a daily cronjob and normally > not run manually. If you look into your cronjob configuration you can change > the options it's run with to fit your library's needs and clean up the > z39.50 imported records regularly. > > There is also a tool that helps to run any of the scripts from command line > - it sets up all the right environment variables for you: > https://wiki.koha-community.org/wiki/ > Commands_provided_by_the_Debian_packages#koha-shell Katrin, Thanks for the information. Somehow I missed the koha-shell. After a number of years of Koha, you'd think I'd be more diligent in reading documentation. The reason for the manual command started with Kyle Hall's sugggeston and highlighting the database bloat with z39.50 records. Also, our cronjobs are not running as expected. I suspect a local configuration problems, even though it's a fresh vanilla package setup. The koha-shell does do what I needed without a new command, so I'll close the enhancement bug.