Migrate from mysql

Started by Florent THOMASover 12 years ago3 messagesgeneral
Jump to latest
#1Florent THOMAS
mailinglist@tdeo.fr

Hy folks,

I'm trying to migrate a database running on mysql for the famous
www.redmine.org from mysql to postgresql.
I was looking for ressources and I found this :
http://www.olimpiks.ru/2011/03/redmine-mysqlpostgresql-converter.html
The process is almost perfect except for the binary datas.
I have this kind of messages :

/psql:redmine_postgres.sql:155714: ERROR: invalid input syntax for type
bytea
LIGNE 1 : ...TO "wiki_content_versions" VALUES (561,108,108,24,E'h1. Proc...
^
psql:redmine_postgres.sql:155728: ERROR: invalid input syntax for type bytea
LIGNE 1 : ...TO "wiki_content_versions" VALUES (575,113,113,24,E'h1. Open...
/
And other like this :
/psql:redmine_postgres.sql:156648: ERROR: invalid byte sequence for
encoding "UTF8": 0xda 0x75
psql:redmine_postgres.sql:156649: ERROR: invalid byte sequence for
encoding "UTF8": 0xda 0xcb
psql:redmine_postgres.sql:156650: ERROR: invalid byte sequence for
encoding "UTF8": 0xda 0x2d
psql:redmine_postgres.sql:156651: ERROR: invalid byte sequence for
encoding "UTF8": 0xef 0x6e 0xdb
/
Does anyone already manage some migration and have some kind of issue on
bytearray?

Thanks for helping,

regards

#2Merlin Moncure
mmoncure@gmail.com
In reply to: Florent THOMAS (#1)
Re: Migrate from mysql

On Mon, Sep 9, 2013 at 5:15 PM, Florent THOMAS <mailinglist@tdeo.fr> wrote:

Hy folks,

I'm trying to migrate a database running on mysql for the famous
www.redmine.org from mysql to postgresql.
I was looking for ressources and I found this :
http://www.olimpiks.ru/2011/03/redmine-mysqlpostgresql-converter.html
The process is almost perfect except for the binary datas.
I have this kind of messages :

psql:redmine_postgres.sql:155714: ERROR: invalid input syntax for type
bytea
LIGNE 1 : ...TO "wiki_content_versions" VALUES (561,108,108,24,E'h1. Proc...
^
psql:redmine_postgres.sql:155728: ERROR: invalid input syntax for type
bytea
LIGNE 1 : ...TO "wiki_content_versions" VALUES (575,113,113,24,E'h1. Open...

And other like this :
psql:redmine_postgres.sql:156648: ERROR: invalid byte sequence for encoding
"UTF8": 0xda 0x75
psql:redmine_postgres.sql:156649: ERROR: invalid byte sequence for encoding
"UTF8": 0xda 0xcb
psql:redmine_postgres.sql:156650: ERROR: invalid byte sequence for encoding
"UTF8": 0xda 0x2d
psql:redmine_postgres.sql:156651: ERROR: invalid byte sequence for encoding
"UTF8": 0xef 0x6e 0xdb

Does anyone already manage some migration and have some kind of issue on
bytearray?

Can you supply a small sample of the sql as you are trying to insert
it? The important part was truncated from your message...

merlin

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Florent THOMAS (#1)
Re: Migrate from mysql

On 09/09/2013 03:15 PM, Florent THOMAS wrote:

Hy folks,

I'm trying to migrate a database running on mysql for the famous
www.redmine.org from mysql to postgresql.
I was looking for ressources and I found this :
http://www.olimpiks.ru/2011/03/redmine-mysqlpostgresql-converter.html
The process is almost perfect except for the binary datas.

What version of Postgres?

I have this kind of messages :

/psql:redmine_postgres.sql:155714: ERROR: invalid input syntax for type
bytea
LIGNE 1 : ...TO "wiki_content_versions" VALUES (561,108,108,24,E'h1. Proc...
^
psql:redmine_postgres.sql:155728: ERROR: invalid input syntax for type bytea
LIGNE 1 : ...TO "wiki_content_versions" VALUES (575,113,113,24,E'h1. Open...

The escape format for bytea changed, see here for more information:
http://www.postgresql.org/docs/9.3/interactive/datatype-binary.html

/
And other like this :
/psql:redmine_postgres.sql:156648: ERROR: invalid byte sequence for
encoding "UTF8": 0xda 0x75
psql:redmine_postgres.sql:156649: ERROR: invalid byte sequence for
encoding "UTF8": 0xda 0xcb
psql:redmine_postgres.sql:156650: ERROR: invalid byte sequence for
encoding "UTF8": 0xda 0x2d
psql:redmine_postgres.sql:156651: ERROR: invalid byte sequence for
encoding "UTF8": 0xef 0x6e 0xdb
/

Encoding mismatch. What is the encoding for your source data?

Does anyone already manage some migration and have some kind of issue on
bytearray?

Thanks for helping,

regards

--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general