<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hey, Reply to myself, we have make this job with success in production (MP 3.9 in docker). Following this step :
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Be carreful to backup your instance first and ensure than any user will make change in MP during process</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Shell code : <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
```shell</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
# Export date for get unique id
<div>export int="$(date +%F_%H-%M-%S)"</div>
<div><br>
</div>
<div># Make MP backup </div>
<div>/opt/midpoint/bin/ninja.sh -v export -r -z -O /opt/midpoint/var/backup_changeOID_${int}.zip</div>
<div><br>
</div>
<div># unizp backup</div>
<div>unzip /opt/midpoint/var/backup_changeOID_${int}.zip -d /tmp/changeOID</div>
<div><br>
</div>
<div># For each object than need to be changed</div>
<div>export oldOID="4771e0f2-ea31-443c-aaf2-2364f4f7d83c"</div>
<div>export newOID="41746865-6e61-2000-0003-000000000000"</div>
<div><br>
</div>
<div>### Count old oid occurance</div>
<div>grep -i "${oldOID}" /tmp/changeOID/backup_changeOID_${int}-zip.xml | wc -l</div>
<div><br>
</div>
<div>### Check new oid is not used</div>
<div>grep -i "${newOID}" /tmp/changeOID/backup_changeOID_${int}-zip.xml | wc -l</div>
<div><br>
</div>
<div>### Change oid </div>
<div>sed -i "s/${oldOID}/${newOID}/g" /tmp/changeOID/backup_changeOID_${int}-zip.xml</div>
<div><br>
</div>
<div>### Check than new oid is apply - need to return same occurance number as 'Count old oid occurance'</div>
<div>grep -i "${newOID}" /tmp/changeOID/backup_changeOID_${int}-zip.xml | wc -l</div>
<div><br>
</div>
<div>### Delet old object (for avoid import error - Import will create new object with same name as old file, so need to delete old object)</div>
<div>/opt/midpoint/bin/ninja.sh -v delete -r -o ${oldOID}</div>
<div><br>
</div>
<div>#At the end, import backup </div>
<div>/opt/midpoint/bin/ninja.sh -v import -r -O -i /tmp/changeOID/backup_changeOID_${int}-zip.xml</div>
<div><br>
</div>
## Restart MP to ensure all is ok <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
```<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<span style="font-size:8pt; color:rgb(117,123,128)"></span>
<div>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:"Calibri",sans-serif; color:black">Cordialement,</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<table class="MsoNormalTable" style="width:100.0%; border:none; border-top:solid #00BBDF 3.0pt" width="100%" cellspacing="0" cellpadding="0" border="1">
<tbody>
<tr style="">
<td style="width:225.75pt; border:none; padding:0cm 0cm 0cm 0cm" width="708" valign="top">
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;line-height:105%">
<span style="color:black"> </span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;line-height:105%">
<span style=""><img class="x_EmojiInsert" style="max-width:174px; max-height:22px; width:100%" src="https://attachment.outlook.office.net/owa/sylvaire-kevin.tipa@mythalesgroup.io/service.svc/s/GetFileAttachment?id=AAMkAGY1ZjY5NWRmLTQ0ZDgtNGNjMy05NzNkLWJmMDRiMWE1MzRlZABGAAAAAABh4WdBWT4xR7DMeIEaHdTyBwAoAS%2FqG5cHS6e%2BmMV1HZP5AAAAAAEJAAAoAS%2FqG5cHS6e%2BmMV1HZP5AAA6Qq2YAAABEgAQABu5cy33gBtFlMD7DO8YR0A%3D&X-OWA-CANARY=ChiPfpk72ke8XYNev7RaMjBqkl3Gx9UY9Eb1nD0ESaO9Vu49v6lQFICf4be4xrzkFIas0KMHQr8.&token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjA2MDBGOUY2NzQ2MjA3MzdFNzM0MDRFMjg3QzQ1QTgxOENCN0NFQjgiLCJ4NXQiOiJCZ0Q1OW5SaUJ6Zm5OQVRpaDhSYWdZeTN6cmciLCJ0eXAiOiJKV1QifQ.eyJ2ZXIiOiJFeGNoYW5nZS5DYWxsYmFjay5WMSIsImFwcGN0eHNlbmRlciI6Ik93YURvd25sb2FkQGNkOTQzYmVhLTZjYmQtNGI1Mi05ZWVkLTY1MDE1MjYwMzBlYSIsImFwcGN0eCI6IntcIm1zZXhjaHByb3RcIjpcIm93YVwiLFwicHJpbWFyeXNpZFwiOlwiUy0xLTUtMjEtMTg2Mjg2NDE5LTE3ODA1Mzc0ODItMzc3MTQ0MjUwMy0xNzA1MDkzXCIsXCJwdWlkXCI6XCIxMTUzODM2Mjk2ODEyMDA2MTcyXCIsXCJvaWRcIjpcImUwNDllZjY1LTA3OTctNGFlNC04YTlkLTI4ZDg4NTU5ZDAzMVwiLFwic2NvcGVcIjpcIk93YURvd25sb2FkXCJ9IiwibmJmIjoxNTI3ODYwODc3LCJleHAiOjE1Mjc4NjE0NzcsImlzcyI6IjAwMDAwMDAyLTAwMDAtMGZmMS1jZTAwLTAwMDAwMDAwMDAwMEBjZDk0M2JlYS02Y2JkLTRiNTItOWVlZC02NTAxNTI2MDMwZWEiLCJhdWQiOiIwMDAwMDAwMi0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvYXR0YWNobWVudC5vdXRsb29rLm9mZmljZS5uZXRAY2Q5NDNiZWEtNmNiZC00YjUyLTllZWQtNjUwMTUyNjAzMGVhIn0.nd8YaoCszRU3J-pTpf2fo2Sjs4X8EeyDVIGRODX-WaLwtbDHAXqMEVMw2_wldyedQ07nJYXTXI7yJ8JwPB09H30wKs9ytHcuchZNPhJZWc6x2ssYRUfiW4dtcuFpSIV16vXS_Lu61-cjbcKGtHNAbGDYFgKiv3vMLzge_N95-xkvLd0GDbPrk743gK0l9TUIjfLTgnrK2uqlSwpVRUeL_dSG-_kKqaMyvJNo0Eh55dKUckmZhws2shczl72V4Ftt-dWzklX6lDGZ6goiYMWb3i0T-_QekdsXRNXlCRO7nIUSlBRndBjtfCMaOE40RBI9lcp9VQKmxWAWQDJpNEUhtQ&owa=outlook.office365.com&isImagePreview=True"></span><span style="color:black"></span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;line-height:105%">
<span style="color:black"> </span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;line-height:105%">
<b><span style="font-size:10.0pt; line-height:105%; font-family:"Arial",sans-serif; color:#1F497D">Sylvaire-Kevin TIPA</span></b><i><span style="font-size:10.0pt; line-height:105%; color:#757B80">
</span></i></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;line-height:105%">
<i><span style="font-size:10.0pt; line-height:105%; color:#767171">Thales Services / OIC / DevOps Automatisation Infrastructures</span></i></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;line-height:105%">
<span style="color:#BFBFBF">…………………………………………………………………………………………</span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;line-height:105%">
<span style="font-size:9.0pt; line-height:105%; color:gray">THALES SERVICES SAS<br>
44 Quai Charles de Gaulle<br>
CS 20100<br>
69463 Lyon Cedex 06</span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;line-height:105%">
<span style="color:#BFBFBF">…………………………………………………………………………………………</span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;line-height:105%">
<span style="color:#1F497D"><a href="http://www.thalesgroup.com/"><span style="font-size:8.5pt; line-height:105%; font-family:"Arial",sans-serif; color:gray">www.thalesgroup.com</span></a></span><span style="color:#BFBFBF"></span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;line-height:105%">
<span style="color:black"> </span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;"><span style="color:black; display:none"> </span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;"> </p>
</div>
<br>
<span style="font-size:8pt; color:rgb(117,123,128)"></span><span style="font-size:8pt; color:rgb(117,123,128)"></span>
<p style="margin-top: 0px; margin-bottom: 0px;"></p>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De :</b> Sylvaire kevin TIPA<br>
<b>Envoyι :</b> lundi 25 mai 2020 01:11<br>
<b>ΐ :</b> midpoint@lists.evolveum.com <midpoint@lists.evolveum.com><br>
<b>Objet :</b> Change OID</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hey all,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
it's possible to change object OID (en keep link) that is in use ? I thinks that MP pure canno't do that, but with bulk action / ninja bin / SQL in BDD ?
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
If I need it, do you have some tip, best way or idee of how to do that ? <br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thanks, br, <br>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<span style="font-size:8pt; color:rgb(117,123,128)"></span>
<div>
<p style="margin-top:0px; margin-bottom:0px"><span style="font-family:"Calibri",sans-serif; color:black">Cordialement,</span></p>
<p style="margin-top:0px; margin-bottom:0px"><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<table class="x_MsoNormalTable" width="100%" cellspacing="0" cellpadding="0" border="1" style="width:100.0%; border:none; border-top:solid #00BBDF 3.0pt">
<tbody>
<tr style="">
<td width="708" valign="top" style="width:225.75pt; border:none; padding:0cm 0cm 0cm 0cm">
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px; line-height:105%">
<span style="color:black"> </span></p>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px; line-height:105%">
<span style=""><img class="x_x_EmojiInsert" style="max-width:174px; max-height:22px; width:100%" src="https://attachment.outlook.office.net/owa/sylvaire-kevin.tipa@mythalesgroup.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MDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvYXR0YWNobWVudC5vdXRsb29rLm9mZmljZS5uZXRAY2Q5NDNiZWEtNmNiZC00YjUyLTllZWQtNjUwMTUyNjAzMGVhIn0.nd8YaoCszRU3J-pTpf2fo2Sjs4X8EeyDVIGRODX-WaLwtbDHAXqMEVMw2_wldyedQ07nJYXTXI7yJ8JwPB09H30wKs9ytHcuchZNPhJZWc6x2ssYRUfiW4dtcuFpSIV16vXS_Lu61-cjbcKGtHNAbGDYFgKiv3vMLzge_N95-xkvLd0GDbPrk743gK0l9TUIjfLTgnrK2uqlSwpVRUeL_dSG-_kKqaMyvJNo0Eh55dKUckmZhws2shczl72V4Ftt-dWzklX6lDGZ6goiYMWb3i0T-_QekdsXRNXlCRO7nIUSlBRndBjtfCMaOE40RBI9lcp9VQKmxWAWQDJpNEUhtQ&owa=outlook.office365.com&isImagePreview=True"></span><span style="color:black"></span></p>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px; line-height:105%">
<span style="color:black"> </span></p>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px; line-height:105%">
<b><span style="font-size:10.0pt; line-height:105%; font-family:"Arial",sans-serif; color:#1F497D">Sylvaire-Kevin TIPA</span></b><i><span style="font-size:10.0pt; line-height:105%; color:#757B80">
</span></i></p>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px; line-height:105%">
<i><span style="font-size:10.0pt; line-height:105%; color:#767171">Thales Services / OIC / DevOps Automatisation Infrastructures</span></i></p>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px; line-height:105%">
<span style="color:#BFBFBF">…………………………………………………………………………………………</span></p>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px; line-height:105%">
<span style="font-size:9.0pt; line-height:105%; color:gray">THALES SERVICES SAS<br>
44 Quai Charles de Gaulle<br>
CS 20100<br>
69463 Lyon Cedex 06</span></p>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px; line-height:105%">
<span style="color:#BFBFBF">…………………………………………………………………………………………</span></p>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px; line-height:105%">
<span style="color:#1F497D"><a href="http://www.thalesgroup.com/"><span style="font-size:8.5pt; line-height:105%; font-family:"Arial",sans-serif; color:gray">www.thalesgroup.com</span></a></span><span style="color:#BFBFBF"></span></p>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px; line-height:105%">
<span style="color:black"> </span></p>
</td>
</tr>
</tbody>
</table>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px"><span style="color:black; display:none"> </span></p>
<p class="x_MsoNormal" style="margin-top:0px; margin-bottom:0px"> </p>
</div>
<br>
<span style="font-size:8pt; color:rgb(117,123,128)"></span><span style="font-size:8pt; color:rgb(117,123,128)"></span>
<p style="margin-top:0px; margin-bottom:0px"></p>
</div>
</div>
</div>
</div>
<p style="font-size:8pt; line-height:10pt; font-family: 'Cambria','times roman',serif;">
This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are
 notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
</p>
</body>
</html>