Migrating from Bugzilla 2.18/MySQL 4.1.11 to Bugzilla 2.22/Postgres 8.1.3

What is the best way to migrate a bugzilla installation 2.18/MySQL 
4.1.11 on machine A to a bugzilla installation 2.22/Postgres 8.1.3 on 
machine B?

Thanks,
Ey´┐Żun E. Jacobsen
0
ISO
4/25/2006 11:25:41 PM
mozilla.support.bugzilla 10121 articles. 0 followers. Post Follow

4 Replies
766 Views

Similar Articles

[PageSpeed] 54

On Wed, 2006-04-26 at 00:25 +0100, "Eyðun E. Jacobsen" wrote:
> What is the best way to migrate a bugzilla installation 2.18/MySQL 
> 4.1.11 on machine A to a bugzilla installation 2.22/Postgres 8.1.3 on 
> machine B?

	1. Upgrade the MySQL/2.18 to 2.22. (Follow the upgrade instructions in
the release notes.)
	2. Run checksetup in a Pg version of 2.22.
	3. Use contrib/bzdbcopy.pl. (Read the top of the file itself for
details.)

	-Max
-- 
http://www.everythingsolved.com/
Competent, Friendly Bugzilla Services. And Everything Else, too.

0
Max
4/26/2006 7:23:45 AM
Max Kanat-Alexander wrote:
> On Wed, 2006-04-26 at 00:25 +0100, "Eyðun E. Jacobsen" wrote:
>> What is the best way to migrate a bugzilla installation 2.18/MySQL 
>> 4.1.11 on machine A to a bugzilla installation 2.22/Postgres 8.1.3 on 
>> machine B?
> 
> 	1. Upgrade the MySQL/2.18 to 2.22. (Follow the upgrade instructions in
> the release notes.)
> 	2. Run checksetup in a Pg version of 2.22.
> 	3. Use contrib/bzdbcopy.pl. (Read the top of the file itself for
> details.)
> 
> 	-Max

Thanks, i've succeeded with those steps and a new installation
Bugzilla 2.22/Postgres 8.1.3/Solaris 10 up and running.

There is one thing though, the original installation was latin1 and I'm 
considering converting to UTF8. I have tried the following
1) bzdbcopy.pl copies data into a latin1 postgres database
2) pg_dump bugs > bugs_dump_latin1.txt
3) drop the bugs database and recreate it using UTF8 encoding
4) psql -f bugs_dump_latin1.txt bugs
5) change the bugzilla Parameters to utf8=on

This works well except that existing Saved Searches don't work - they 
use a product name that contains an 'ø' character - see error message 
below. However, I can create new Saved Searchs that are ok.

---------------------------
Software error:

DBD::Pg::st execute failed: ERROR:  invalid UTF-8 byte sequence detected 
near byte 0xf8
  [for Statement "SELECT products.id FROM products WHERE products.name 
IN ('Nøglan')"] at Bugzilla/DB.pm line 84
	Bugzilla::DB::SendSQL('SELECT products.id FROM products WHERE 
products.name IN (\'N\x{f8}...') called at Bugzilla/Search.pm line 1559
	Bugzilla::Search::build_subselect('bugs.product_id', 'products.id', 
'products', 'products.name IN (\'N\x{f8}glan\')') called at 
Bugzilla/Search.pm line 909
	Bugzilla::Search::__ANON__ called at Bugzilla/Search.pm line 1315
	Bugzilla::Search::init('Bugzilla::Search=HASH(0x8d3bd3c)') called at 
Bugzilla/Search.pm line 84
	Bugzilla::Search::new('Bugzilla::Search', 'fields', 'ARRAY(0x8b3c160)', 
'params', 'Bugzilla::CGI=HASH(0x8d23800)', 'order', 'ARRAY(0x8b40b8c)') 
called at /export/home/bugzilla/bugzilla/buglist.cgi line 850

For help, please send mail to the webmaster (eej@att.fo), giving this 
error message and the time and date of the error.

---------------------------

How can this be fixed? Or should I delete all saved searches and ask the 
users to recreate them?

Thanks,
Eyðun E. Jacobsen
0
UTF
5/2/2006 12:29:44 AM
Eyðun E. Jacobsen wrote:
> There is one thing though, the original installation was latin1 and I'm 
> considering converting to UTF8. I have tried the following
> This works well except that existing Saved Searches don't work - they 
> use a product name that contains an 'ø' character

> How can this be fixed? Or should I delete all saved searches and ask the 
> users to recreate them?

Saved Searches are url_quote'ed before stored.
see Bugzilla/Util.pm
see 'name' column in the 'namedqueries' table
decode those as old encode, encode those as utf8,
  and replace with them, and it may work.

--
victory
0
victory
5/2/2006 1:03:35 AM
On Tue, 2006-05-02 at 01:29 +0100, "Eyðun E. Jacobsen" wrote:
> There is one thing though, the original installation was latin1 and I'm 
> considering converting to UTF8. I have tried the following

	Actually...I wouldn't worry about converting the PostgreSQL database to
UTF-8. It actually will correctly return UTF-8 characters to you if you
store UTF-8 characters in there, even though its encoding is latin1 by
default. At least, this has been my experience.

	It just does the translation correctly. It even seems to sort things
properly.

	-Max
-- 
http://www.everythingsolved.com/
Everything Solved: Competent, Friendly Bugzilla and Linux Services

0
Max
5/4/2006 8:22:00 PM
Reply: