Try to migrating from MySQL to Postgres

Hi.

I try to make a migration in my dev server from MySQL to Postgres.

Now im trying to use the scrip from Dario given in this thread
http://www.gossamer-threads.com/lists/rt/users/103305

I get this error:

[root@rt ~]# ./RTmysqltoPg
Migrating ACL…
maxid=83
Asked ACL for 2000 starting from 0, got 73
DBD::Pg::st execute failed: ERROR: duplicate key violates unique
«acl_pkey» at ./RTmysqltoPg line 130.
Use of uninitialized value $values[6] in join or string at ./RTmysqltoPg
line 130.
Use of uninitialized value $values[8] in join or string at ./RTmysqltoPg
line 130.

2,0,SuperUser,1,0,Group,1,RT::System at ./RTmysqltoPg line 130.

in the ACL table there aren´t duplicates key for ID.
The new database is empty, only generated by # make initialize-database

Any help?

I attach the script.

Thanks.
Kindest Regards.

Un saludo.
Juanjo Corral

RTmysqltoPg (4.99 KB)

I used the following after some key issues.

Using Pg to request password for local connections

/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password --action drop
/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password --action create
/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password --action schema --datadir /opt/rt4/etc/schema.Pg
/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password --action acl --datadir /opt/rt4/etc/acl.Pg

Change Pg back to default auth for postgres from local

Then run ./RTmysqltoPg

AndersFra: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] På vegne av Juanjo
Sendt: 26. juni 2012 09:54
Til: rt-users@lists.bestpractical.com
Emne: [rt-users] Try to migrating from MySQL to Postgres

Hi.

I try to make a migration in my dev server from MySQL to Postgres.

Now im trying to use the scrip from Dario given in this thread Carbon60: Cloud Consulting - Services and Solutions

I get this error:

[root@rt ~]# ./RTmysqltoPg
Migrating ACL…
maxid=83
Asked ACL for 2000 starting from 0, got 73
DBD::Pg::st execute failed: ERROR: duplicate key violates unique «acl_pkey» at ./RTmysqltoPg line 130.
Use of uninitialized value $values[6] in join or string at ./RTmysqltoPg line 130.
Use of uninitialized value $values[8] in join or string at ./RTmysqltoPg line 130.

2,0,SuperUser,1,0,Group,1,RT::System at ./RTmysqltoPg line 130.

in the ACL table there aren´t duplicates key for ID.
The new database is empty, only generated by # make initialize-database

Any help?

I attach the script.

Thanks.
Kindest Regards.

Un saludo.
Juanjo Corral

Ok, tahnks. I think is working. Almost the script is running well.

I have some errors like that:
Use of uninitialized value $mymaxid in concatenation (.) or string at
./RTmysqltoPg line 35.2012/6/26 Anders Hansen-Øvre Anders.Hansen-Ovre@contra.no

I used the following after some key issues.****


Using Pg to request password for local connections****


/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password
–action drop****

/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password
–action create****

/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password
–action schema --datadir /opt/rt4/etc/schema.Pg****

/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password
–action acl --datadir /opt/rt4/etc/acl.Pg****


Change Pg back to default auth for postgres from local****


Then run ./RTmysqltoPg****


—****

Anders****


Fra: rt-users-bounces@lists.bestpractical.com [mailto:
rt-users-bounces@lists.bestpractical.com] På vegne av Juanjo
Sendt: 26. juni 2012 09:54
Til: rt-users@lists.bestpractical.com
Emne: [rt-users] Try to migrating from MySQL to Postgres****


Hi.

I try to make a migration in my dev server from MySQL to Postgres.

Now im trying to use the scrip from Dario given in this thread
Carbon60: Cloud Consulting - Services and Solutions

I get this error:

[root@rt ~]# ./RTmysqltoPg
Migrating ACL…
maxid=83
Asked ACL for 2000 starting from 0, got 73
DBD::Pg::st execute failed: ERROR: duplicate key violates unique
«acl_pkey» at ./RTmysqltoPg line 130.
Use of uninitialized value $values[6] in join or string at ./RTmysqltoPg
line 130.
Use of uninitialized value $values[8] in join or string at ./RTmysqltoPg
line 130.

2,0,SuperUser,1,0,Group,1,RT::System at ./RTmysqltoPg line 130.

in the ACL table there aren´t duplicates key for ID.
The new database is empty, only generated by # make initialize-database

Any help?

I attach the script.

Thanks.
Kindest Regards.


Un saludo.
Juanjo Corral****

Un saludo.
Juanjo Corral

Un saludo.
Juanjo Corral