issue when moving bugzilla between machines

85 Views Asked by At

I am trying to move an exisiting bugzilla installation (using Postgres) from an old machine on ubuntu 20.04 LTS, to a new machine on ubuntu 22.04 LTS. I have followed the listed instructions mentioned here: https://bugzilla.readthedocs.io/en/latest/installing/moving.html, and it ends up with the following error message: Adding new table bz_schema... DBD::Pg::db do failed: ERROR: relation "bz_schema" already exists at Bugzilla/DB.pm line 848.

from the instructions here: https://bugzilla.readthedocs.io/en/latest/installing/moving.html, I have launched the following commands:

*) install Bugzilla on the new machine: get a bugzilla version (5.0.6), and copy it into /var/www/bz

$ cd /var/www/bz
$ ./checksetup.pl --check-modules
$ ./install-module.pl --all

$ sudo -u postgres dropdb bugs
$ sudo -u postgres createdb -U postgres -O bugs bugs

$ ./checksetup.pl

then I have edited the localconfig file, changed the $webservergroup to 'www-data', the $db_pass, and the $db_driver to 'Pg'.

$ ./checksetup.pl

$ ./testserver.pl http://mydomain/bz

Everything OK here.

**) now starts the move from the old machine:

I have deleted the localconfig and the data directory, and replace them with the localconfig and the data directory from the old machine.

Then I have dropped the 'bugs' database and have recreated it.

$ sudo -u postgres dropdb bugs
$ sudo -u postgres createdb -U postgres -O bugs bugs

And finally I have populated the 'bugs' database with the one coming from the old machine

$ sudo -u postgres psql -d bugs </tmp/old_bz.sql

(The dump was obtained using the following command, on the old machine:)

$ pg_dump --no-privileges --no-owner -h localhost -U $USERNAME > old_bz.sql

Then I have executed again checksetup.pl

$ ./checksetup.pl

, which results in the following error message:

  • This is Bugzilla 5.0.6 on perl 5.34.0 [...checking messages cut...] Reading ./localconfig... Checking for DBD-Pg (v2.7.0) ok: found v3.16.3 Checking for PostgreSQL (v8.03.0000) ok: found v14.00.0700 Checking for DBD-Pg (v2.17.2) ok: found v3.16.3

Adding new table bz_schema... DBD::Pg::db do failed: ERROR: relation "bz_schema" already exists at Bugzilla/DB.pm line 848. Bugzilla::DB::_bz_add_table_raw(Bugzilla::DB::Pg=HASH(0x55dd83d9bbc8), "bz_schema") called at Bugzilla/DB.pm line 1380 Bugzilla::DB::_bz_init_schema_storage(Bugzilla::DB::Pg=HASH(0x55dd83d9bbc8)) called at Bugzilla/DB.pm line 506 Bugzilla::DB::bz_setup_database(Bugzilla::DB::Pg=HASH(0x55dd83d9bbc8)) called at Bugzilla/DB/Pg.pm line 279 Bugzilla::DB::Pg::bz_setup_database(Bugzilla::DB::Pg=HASH(0x55dd83d9bbc8)) called at ./checksetup.pl line 123

Any idea about what is happening ?

0

There are 0 best solutions below