<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EpostStil17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I used the following after some key issues.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Using Pg to request password for local connections<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password --action drop<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password --action create<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password --action schema --datadir /opt/rt4/etc/schema.Pg<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">/opt/rt4/sbin/rt-setup-database --dba postgres --prompt-for-password --action acl --datadir /opt/rt4/etc/acl.Pg<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Change Pg back to default auth for postgres from local<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Then run ./RTmysqltoPg<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">---<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Anders<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Fra:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com]
<b>På vegne av</b> Juanjo<br>
<b>Sendt:</b> 26. juni 2012 09:54<br>
<b>Til:</b> rt-users@lists.bestpractical.com<br>
<b>Emne:</b> [rt-users] Try to migrating from MySQL to Postgres<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi.<br>
<br>
I try to make a migration in my dev server from MySQL to Postgres.<br>
<br>
Now im trying to use the scrip from Dario given in this thread <a href="http://www.gossamer-threads.com/lists/rt/users/103305">
http://www.gossamer-threads.com/lists/rt/users/103305</a><br>
<br>
I get this error:<br>
<br>
[root@rt ~]# ./RTmysqltoPg <br>
Migrating ACL...<br>
maxid=83<br>
Asked ACL for 2000 starting from 0, got 73<br>
DBD::Pg::st execute failed: ERROR: duplicate key violates unique «acl_pkey» at ./RTmysqltoPg line 130.<br>
Use of uninitialized value $values[6] in join or string at ./RTmysqltoPg line 130.<br>
Use of uninitialized value $values[8] in join or string at ./RTmysqltoPg line 130.<br>
<br>
2,0,SuperUser,1,0,Group,,1,,RT::System at ./RTmysqltoPg line 130.<br>
<br>
<br>
<br>
in the ACL table there aren´t duplicates key for ID.<br>
The new database is empty, only generated by # make initialize-database<br>
<br>
Any help?<br>
<br>
I attach the script.<br>
<br>
Thanks.<br>
Kindest Regards.<br clear="all">
<br>
-- <br>
Un saludo.<br>
Juanjo Corral<o:p></o:p></p>
</div>
</body>
</html>