Hello, I'm a very-new Koha user, and have a fresh installation of Koha 3.00.00 on Ubuntu 8.04. I initially choose to have the sample data installed out of the box, but would now like to try the application out using semi-real data. A search turned up only info for older versions, so I'll pose this question: What is the best way to reset or "wipe" the database clean in Koha 3, while (optionally) retaining configuration settings? Thanks! - DR -- david a. riggs software engineer, createTank mailto:riggs@createtank.com voice: +1-304-685-7537 fax: +1-800-975-8379 http://createtank.com
On Mon, Jan 26, 2009 at 09:53:54AM -0500, David Riggs wrote:
Hello, hello,
What is the best way to reset or "wipe" the database clean in Koha 3, while (optionally) retaining configuration settings?
this is the zsh script i use for myself: tables=( bibio biblioitems items auth_header sessions zebraqueue ) print 'truncate '$^tables'; ' | mysql if you don't use zsh, just open your prefered mysql client and truncate all the tables listed between the 2 parentheses. -- Marc Chantreux BibLibre, expert en logiciels libres pour l'info-doc http://biblibre.com
On Mon, Jan 26, 2009 at 10:40 AM, Marc Chantreux <marc.chantreux@biblibre.com> wrote:
On Mon, Jan 26, 2009 at 09:53:54AM -0500, David Riggs wrote:
What is the best way to reset or "wipe" the database clean in Koha 3, while (optionally) retaining configuration settings?
this is the zsh script i use for myself:
tables=( bibio biblioitems items auth_header sessions zebraqueue )
print 'truncate '$^tables'; ' | mysql
I've truncated the tables listed above, but I still have items showing up in search results. Do I need to run some command to purge the Zebra index also? Thanks for your help! - DR -- david a. riggs software engineer, createTank mailto:riggs@createtank.com voice: +1-304-685-7537 fax: +1-800-975-8379 http://createtank.com
On Mon, Jan 26, 2009 at 03:04:00PM -0500, David Riggs wrote:
I've truncated the tables listed above, but I still have items showing up in search results. Do I need to run some command to purge the Zebra index also?
don't carre about that and just use rebuild_zebra.pl with the -r flag. regards -- Marc Chantreux BibLibre, expert en logiciels libres pour l'info-doc http://biblibre.com
On Mon, Jan 26, 2009 at 3:20 PM, Marc Chantreux <marc.chantreux@biblibre.com> wrote:
On Mon, Jan 26, 2009 at 03:04:00PM -0500, David Riggs wrote:
I've truncated the tables listed above, but I still have items showing up in search results. Do I need to run some command to purge the Zebra index also?
don't carre about that and just use rebuild_zebra.pl with the -r flag.
I ran the following commands (Ubuntu 8.04) and still get items showing up in search results. Clicking on the item gives a 404 error. $> sudo su - koha $> export PERL5LIB=/usr/share/koha/lib/ $> export KOHA_CONF=/etc/koha/koha-conf.xml $> perl -I /usr/share/koha/lib /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a -r Thanks, - DR -- david a. riggs software engineer, createTank mailto:riggs@createtank.com voice: +1-304-685-7537 fax: +1-800-975-8379 http://createtank.com
On 2009/01/27, at 9:39 AM, David Riggs wrote:
On Mon, Jan 26, 2009 at 3:20 PM, Marc Chantreux <marc.chantreux@biblibre.com> wrote:
On Mon, Jan 26, 2009 at 03:04:00PM -0500, David Riggs wrote:
I've truncated the tables listed above, but I still have items showing up in search results. Do I need to run some command to purge the Zebra index also?
don't carre about that and just use rebuild_zebra.pl with the -r flag.
I ran the following commands (Ubuntu 8.04) and still get items showing up in search results. Clicking on the item gives a 404 error.
$> sudo su - koha $> export PERL5LIB=/usr/share/koha/lib/ $> export KOHA_CONF=/etc/koha/koha-conf.xml $> perl -I /usr/share/koha/lib /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a -r
Thanks, - DR
just use 'rebuild_zebra.pl -r' no -a or -b args
On Mon, Jan 26, 2009 at 4:01 PM, Mason James <mason.loves.sushi@gmail.com> wrote:
On 2009/01/27, at 9:39 AM, David Riggs wrote:
I ran the following commands (Ubuntu 8.04) and still get items showing up in search results. Clicking on the item gives a 404 error.
$> sudo su - koha $> export PERL5LIB=/usr/share/koha/lib/ $> export KOHA_CONF=/etc/koha/koha-conf.xml $> perl -I /usr/share/koha/lib /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a -r
just use 'rebuild_zebra.pl -r'
no -a or -b args
Apparently that's not allowed. $> koha@linimac:~$ perl /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -r Must specify -b or -a to reindex bibs or authorities Please do '/usr/share/koha/bin/migration_tools/rebuild_zebra.pl --help' to see usage. Thanks, - DR -- david a. riggs software engineer, createTank mailto:riggs@createtank.com voice: +1-304-685-7537 fax: +1-800-975-8379 http://createtank.com
On 2009/01/27, at 10:10 AM, David Riggs wrote:
On Mon, Jan 26, 2009 at 4:01 PM, Mason James <mason.loves.sushi@gmail.com> wrote:
On 2009/01/27, at 9:39 AM, David Riggs wrote:
I ran the following commands (Ubuntu 8.04) and still get items showing up in search results. Clicking on the item gives a 404 error.
$> sudo su - koha $> export PERL5LIB=/usr/share/koha/lib/ $> export KOHA_CONF=/etc/koha/koha-conf.xml $> perl -I /usr/share/koha/lib /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a -r
just use 'rebuild_zebra.pl -r'
no -a or -b args
Apparently that's not allowed.
$> koha@linimac:~$ perl /usr/share/koha/bin/migration_tools/ rebuild_zebra.pl -r Must specify -b or -a to reindex bibs or authorities Please do '/usr/share/koha/bin/migration_tools/rebuild_zebra.pl --help' to see usage.
Thanks, - DR
ah, ok try a 'zebraidx -c /yourpath/koha-conf.xml init' then FYI: have a peek at line 488-ish of the rebuild script system("zebraidx -c $zebra_config -g $record_format -d $zebra_db_name init") if $reset_index;
On Mon, Jan 26, 2009 at 4:16 PM, Mason James <mason.loves.sushi@gmail.com> wrote:
try a 'zebraidx -c /yourpath/koha-conf.xml init' then
FYI: have a peek at line 488-ish of the rebuild script
system("zebraidx -c $zebra_config -g $record_format -d $zebra_db_name init") if $reset_index;
No change. I continue to get results when searching, despite having truncated the listed tables, running various combinations of `rebuild_zebra.pl` and `zebraidx -c`. Clicking those items results in a 404. I have verified that browser caching is not at fault. I'm supposed to give an evaluation of Koha's suitability for use this week, and having the database(s) in an inconsistent state is making that extremely difficult. While it would be nice to persist my configuration changes, I'd be happy just blowing away and re-creating the database. Can someone please point me to docs or offer help as to how to re-initialize the DB without doing a complete re-installation? I'm overwhelmed by the number of scripts and data files provided, and unable to find documentation aside from reading hundreds of lines of Perl. Thanks for your help! - DR -- david a. riggs software engineer, createTank mailto:riggs@createtank.com voice: +1-304-685-7537 fax: +1-800-975-8379 http://createtank.com
On 2009/01/27, at 10:51 AM, David Riggs wrote:
On Mon, Jan 26, 2009 at 4:16 PM, Mason James <mason.loves.sushi@gmail.com> wrote:
try a 'zebraidx -c /yourpath/koha-conf.xml init' then
FYI: have a peek at line 488-ish of the rebuild script
system("zebraidx -c $zebra_config -g $record_format -d $zebra_db_name init") if $reset_index;
No change. I continue to get results when searching, despite having truncated the listed tables, running various combinations of `rebuild_zebra.pl` and `zebraidx -c`. Clicking those items results in a 404. I have verified that browser caching is not at fault.
I'm supposed to give an evaluation of Koha's suitability for use this week, and having the database(s) in an inconsistent state is making that extremely difficult. While it would be nice to persist my configuration changes, I'd be happy just blowing away and re-creating the database. Can someone please point me to docs or offer help as to how to re-initialize the DB without doing a complete re-installation? I'm overwhelmed by the number of scripts and data files provided, and unable to find documentation aside from reading hundreds of lines of Perl.
Thanks for your help! - DR
ok, to wipe your zebra auth and bib dbs - this works for me.. # zebraidx -c /home/mason/koha/ashs/etc/zebradb/zebra-authorities- dom.cfg -g iso2709 -d authorities init 11:01:02-27/01 zebraidx(17800) [log] zebra_start 2.0.34 /home/mason/ koha/ashs/etc/zebradb/zebra-authorities-dom.cfg 11:01:02-27/01 zebraidx(17800) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-text.so 11:01:02-27/01 zebraidx(17800) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-dom.so 11:01:02-27/01 zebraidx(17800) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-alvis.so 11:01:02-27/01 zebraidx(17800) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-grs-marc.so 11:01:02-27/01 zebraidx(17800) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-grs-xml.so 11:01:02-27/01 zebraidx(17800) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-grs-regx.so 11:01:02-27/01 zebraidx(17800) [log] enabling shadow spec=/home/mason/ koha/ashs/var/lib/zebradb/authorities/shadow:1G 11:01:02-27/01 zebraidx(17800) [log] cache_fname = /home/mason/koha/ ashs/var/lib/zebradb/authorities/shadow/cache 11:01:02-27/01 zebraidx(17800) [log] zebra_stop: 0.02 0.02 0.00 # zebraidx -c /home/mason/koha/ashs/etc/zebradb/zebra-biblios.cfg - g iso2709 -d biblios init 11:01:26-27/01 zebraidx(17801) [log] zebra_start 2.0.34 /home/mason/ koha/ashs/etc/zebradb/zebra-biblios.cfg 11:01:26-27/01 zebraidx(17801) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-text.so 11:01:26-27/01 zebraidx(17801) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-dom.so 11:01:26-27/01 zebraidx(17801) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-alvis.so 11:01:26-27/01 zebraidx(17801) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-grs-marc.so 11:01:26-27/01 zebraidx(17801) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-grs-xml.so 11:01:26-27/01 zebraidx(17801) [log] Loaded filter module /usr/lib/ idzebra-2.0/modules/mod-grs-regx.so 11:01:26-27/01 zebraidx(17801) [log] enabling shadow spec=/home/mason/ koha/ashs/var/lib/zebradb/biblios/shadow:4G 11:01:26-27/01 zebraidx(17801) [log] cache_fname = /home/mason/koha/ ashs/var/lib/zebradb/biblios/shadow/cache 11:01:26-27/01 zebraidx(17801) [log] zebra_stop: 0.06 0.02 0.00 root@fugu:/etc/apache2/sites-enabled#
On Mon, Jan 26, 2009 at 5:02 PM, Mason James <mason.loves.sushi@gmail.com> wrote:
On 2009/01/27, at 10:51 AM, David Riggs wrote:
I'm supposed to give an evaluation of Koha's suitability for use this week, and having the database(s) in an inconsistent state is making that extremely difficult. While it would be nice to persist my configuration changes, I'd be happy just blowing away and re-creating the database. Can someone please point me to docs or offer help as to how to re-initialize the DB without doing a complete re-installation? I'm overwhelmed by the number of scripts and data files provided, and unable to find documentation aside from reading hundreds of lines of Perl.
ok, to wipe your zebra auth and bib dbs - this works for me..
# zebraidx -c /home/mason/koha/ashs/etc/zebradb/zebra-authorities-dom.cfg -g iso2709 -d authorities init
# zebraidx -c /home/mason/koha/ashs/etc/zebradb/zebra-biblios.cfg -g iso2709 -d biblios init
Ah, thank you! Running these two commands finally cleared out the Zebra index so that it is now in sync with the empty MySQL database. koha@linimac:~$ zebraidx -c /etc/koha/zebradb/zebra-authorities-dom.cfg -g iso2709 -d authorities init koha@linimac:~$ zebraidx -c /etc/koha/zebradb/zebra-biblios.cfg -g iso2709 -d biblios init Again, thanks for all your help! - DR -- david a. riggs software engineer, createTank mailto:riggs@createtank.com voice: +1-304-685-7537 fax: +1-800-975-8379 http://createtank.com
Hello, I thought this was really useful information that I might need to find again later so I posted them to the Koha Wiki. http://wiki.koha.org/doku.php?id=resetdatabasekoha3 Sincerely, Bradley Peters.
participants (4)
-
Bradley Peters -
David Riggs -
Marc Chantreux -
Mason James