<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello Aivo,</p>
<p><br>
</p>
<p>thank you for your comments. <br>
</p>
<p><br>
</p>
<p>I've fixed the wiki page - it really pointed to a wrong file.</p>
<p>As for the import: you're right, referential integrity can be a
problem in this scenario. As for me, I usually import objects with
the default settings. (But yes, Keep OID + Overwrite existing
object is reasonable in your case, as we can expect conflicts on
initial objects.)</p>
<p><br>
</p>
<p>I don't know about the status of MariaDB driver; maybe someone
else could comment on this.<br>
</p>
<p><br>
</p>
<p>Best regards,<br>
</p>
<pre class="moz-signature" cols="72">Pavol Mederly
Software developer
evolveum.com
</pre>
<div class="moz-cite-prefix">On 09.08.2016 15:08, Aivo Kuhlberg
wrote:<br>
</div>
<blockquote cite="mid:1470748119984.84180@rmit.ee" type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
{margin-top:0;
margin-bottom:0}--></style>
<p>Hi Pavol,<br>
Thanks for the useful tip. Exporting all objects made my
migration to MariaDB quite easy. Here are some things what I
noticed and what may be useful to other users:<br>
</p>
<ul>
<li>When creating initial database structure I selected wrong
sql file because of the information
<a moz-do-not-send="true"
href="https://wiki.evolveum.com/display/midPoint/MySQL">here</a>.
File midpoint-3.4/config/sql/midpoint/3.4/mysql/mysql-3.4.sql
does not contain all objects and had to use
midpoint-3.4/config/sql/_all/mysql-3.4-all.sql. I think the
MySQL wiki page needs to be corrected.</li>
<li>When importing I accidently checked too many import options
("Keep OID", "Overwrite existing object", "Referential
integrity", "Validate dynamic schema", "Validate static
schema") but seems that at last some of these options cause
problems in import. I think its because when importing objects
from file some imported objects may refer to objects
which have not yet imported. So I checked only 2 options in
import dialog - "Keep OID" and "Overwrite existing object".</li>
<li>I did not succeed to set up database connection with MariaDB
connector. (Is this connector supported yet with midPoint?) So
I had to use MySQL connector.</li>
<li>After migration I saw in my midPoint log file following
error messages: <span style="color: rgb(255, 0, 0);">
Can not read response from server. Expected to read 4 bytes,
read 0 bytes before connection was unexpectedly lost.</span>
For me the problem was solved when I changed database global
setting wait_timeout from 90 to 3600.<br>
</li>
</ul>
<p><br>
</p>
<p>Regards,</p>
<p>Aivo<br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>Saatja:</b>
midPoint <a class="moz-txt-link-rfc2396E" href="mailto:midpoint-bounces@lists.evolveum.com"><midpoint-bounces@lists.evolveum.com></a>
nimelPavol Mederly <a class="moz-txt-link-rfc2396E" href="mailto:mederly@evolveum.com"><mederly@evolveum.com></a><br>
<b>Saadetud:</b> 4. august 2016 10:28<br>
<b>Adressaat:</b> <a class="moz-txt-link-abbreviated" href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a><br>
<b>Teema:</b> Re: [midPoint] Migrating to another database</font>
<div> </div>
</div>
<div>I'm sorry I have to clarify myself: I meant exporting via
midPoint, i.e. "Export all objects" in Configuration ->
Repository objects.<br>
You can then inspect generated XML and do any fixes you need
manually (if needed).<br>
<br>
Before importing, I'd delete automatically generated connector
objects from MariaDB, so the only ones left would be imported
ones.<br>
<br>
Best regards,<br>
Pavol<br>
<br>
On 04.08.2016 9:11, Pavol Mederly wrote:<br>
<blockquote type="cite">
<p>Hello Aivo,</p>
<p><br>
</p>
<p>one of possible ways is to export all objects from H2 and
re-import them to MariaDB.
<br>
</p>
<p>Beware of encrypted data compatibility - it's probably
good idea to copy midPoint keystore before first start of
midPoint in MariaDB.<br>
</p>
<p><br>
</p>
<p>Best regards,<br>
</p>
<pre class="moz-signature" cols="72">Pavol Mederly
Software developer
evolveum.com
</pre>
<div class="moz-cite-prefix">On 04.08.2016 9:08, Aivo
Kuhlberg wrote:<br>
</div>
<blockquote type="cite">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<p>I have so far used midPonit with embedded H2 database
but now plan to move to MariaDB. I can set up my test
environment again from scratch but it would be much
easier to migrate existing data to another database. Is
there a (not too complicated) way to migrate current
midPoint data to another database?<br>
</p>
<p><br>
</p>
<p>Thanks,<br>
Aivo Kuhlberg<br>
</p>
<br>
<hr>
<font face="Arial" color="Gray" size="2">Käesolev e-kiri
võib sisaldada asutusesiseseks kasutamiseks tunnistatud
teavet.<br>
This e-mail may contain information which is classified
for official use.</font> <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="2">Käesolev e-kiri võib
sisaldada asutusesiseseks kasutamiseks tunnistatud teavet.<br>
This e-mail may contain information which is classified for
official use.</font>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</body>
</html>