[rt-users] Migration from MySQL to PostreSQL - corrupt characters (german umlaut)

Maik Nergert maik.nergert at uni-hamburg.de
Thu Oct 8 07:44:35 EDT 2015


I found an older post on the PostgreSQL mailinglist with same problems 
http://www.postgresql.org/message-id/D960CB61B694CF459DCFB4B0128514C207BB6119@exadv11.host.magwien.gv.at


And I was able to fix the issue by dumping and re-importing the db!


# Create empty PG-DB
rt-setup-database --action create,schema,acl --dba rt_user 
--dba-password DBPASS

# Run importer
rt-importer PATH

# Run Update-Pg-Sequences Script 
(http://requesttracker.wikia.com/wiki/MigrateMysql2PostgresqlV4#Import_your_RT_database)

# Dump DB as latin1
pg_dump -E LATIN1 rt4 > rt4latin.sql

# Replace client_encoding
sed -i 's/LATIN1/UTF8/' rt4latin.sql

# Recreate empty DB
rt-setup-database --action drop --dba rt_user --dba-password DBPASS
rt-setup-database --action create,schema,acl --dba rt_user 
--dba-password DBPASS

# Import DB
psql rt4 < rt4latin.sql

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5413 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20151008/b0f2982c/attachment.bin>


More information about the rt-users mailing list