<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:654339658;
        mso-list-template-ids:-1412771946;}
@list l1
        {mso-list-id:844825250;
        mso-list-template-ids:1951670282;}
@list l1:level1
        {mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l1:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2
        {mso-list-id:971903683;
        mso-list-template-ids:-550217886;}
@list l2:level1
        {mso-level-start-at:4;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l3
        {mso-list-id:982007541;
        mso-list-type:hybrid;
        mso-list-template-ids:911517712 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l3:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l3:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l3:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l3:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l3:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l3:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l3:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l3:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l3:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l4
        {mso-list-id:1668971403;
        mso-list-template-ids:-1554069236;}
@list l4:level1
        {mso-level-start-at:3;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l4:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l5
        {mso-list-id:1690377324;
        mso-list-template-ids:480425644;}
@list l5:level1
        {mso-level-start-at:5;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l5:level2
        {mso-level-number-format:alpha-upper;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2 lfo7
        {mso-level-number-format:alpha-lower;
        mso-level-numbering:continue;
        mso-level-text:"%2\.";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:0cm;
        text-indent:0cm;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l1:level2 lfo9
        {mso-level-number-format:alpha-upper;
        mso-level-numbering:continue;
        mso-level-text:"%2\.";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:0cm;
        text-indent:0cm;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Dan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Thanks for this remarkably thorough write up! One thing I wasn&#8217;t aware of was the export function; I was grabbing the XML from the front end but this should obviously fill in any gaps. I am, however,
 having problems with it!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Using the syntax:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span style="mso-fareast-language:EN-US">export &lt;repositoryid&gt; archive XML &gt; &lt;filename&gt;.xml<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">gives me a file, however the file is never populated. I don&#8217;t know if this is an issue in our repository or if there is a patch anywhere? No errors are thrown on the command line so I&#8217;m at a loss!
 Stumbled at the first hurdle!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Andrew<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>On Behalf Of </b>Stieneke, Dan<br>
<b>Sent:</b> 20 January 2017 20:32<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> Re: [EP-tech] Migrating output data - most efficient way<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I&#8217;ve done migrations of this sort several times. I never did a database dump, but instead exported/imported XML, on the premise when doing a database copy, mysql would only tell me about database
 errors, but an export/import would give eprints a chance to tell me about eprints errors.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">On the most recent iteration, moving from 3.2.4 to 3.3.15, I ran into two problems migrating the actual eprints:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l3 level1 lfo2"><![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore">1)<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D">Exporting was fine, but the import threw a ton of errors. Reversing the .XML file (so newest items were imported first, oldest last) worked. To import in reverse order:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore">a.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US">&nbsp;</span><code><span lang="EN-US" style="font-size:10.0pt">echo &quot;select eprintid from eprint;&quot; | mysql -u root -p
</span></code><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">ARCHIVEID
<code>&gt; list.txt</code></span><span lang="EN-US"> - get a list of current eprints<span style="color:#1F497D"><o:p></o:p></span></span></p>
<p class="MsoListParagraph" style="margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore">b.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">edit
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">list.txt</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> to
</span><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-108.0pt;mso-text-indent-alt:-9.0pt;mso-list:l3 level3 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore"><span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>i.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">Remove top line, which is &#8220;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">eprints&#8221;</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-108.0pt;mso-text-indent-alt:-9.0pt;mso-list:l3 level3 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore"><span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>ii.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">Remove any cancelled items. You have to make at least one import attempt to figure out
 what these are.<br>
When you do a full </span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">export</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">, eprints doesn't emit cancelled or retired items. When you explicitly
 specify each record to export like this, it does. When you import using </span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">--enable-web-imports</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">,
 and the new box tries to pull in cancelled or retired items, the old box refuses to give up the
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">.PDF</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> files, so you get errors.
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">c.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">tac &lt; list.txt &gt; revlist.txt</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> - reverse the list (</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">tac</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
 is </span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">cat</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> in reverse)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">d.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">tr '\n' ' ' &lt; revlist.txt &gt; revlistspaces.txt</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> (go from one eprintID per
 line to a list of space-separated eprintIDs) <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">e.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">~/bin/export ARCHIVEID archive XML $(cat revlistspaces.txt) &gt; REV.xml</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:99.0pt;text-indent:-99.0pt;mso-text-indent-alt:-9.0pt;mso-list:l3 level3 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore"><span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>i.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">This depends on pulling the
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">.PDF</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> files in from the webserver. Use
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">XMLFiles</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> instead of
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">XML</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> to get the whole thing Base64-encoded in the
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">.XML</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> file
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:99.0pt">
<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt;text-indent:-18.0pt;mso-list:l3 level1 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">2)<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">Thesis info changed somewhere between those two versions<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">a.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">Old phd info:
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">&lt;thesis_type&gt;phd&lt;/thesis_type&gt;</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">b.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">Equivalent new phd info:
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">&lt;thesis_type&gt;postdoctoral&lt;/thesis_type&gt;&lt;thesis_name&gt;phd&lt;/thesis_name&gt;</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">c.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">Fixit file :
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">phdfix.sh</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:99.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">&nbsp;#!/bin/bash<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:108.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed 's!&lt;thesis_type&gt;phd&lt;/thesis_type&gt;!&lt;thesis_type&gt;postdoctoral&lt;/thesis_type&gt;&lt;thesis_name&gt;phd&lt;/thesis_name&gt;!' &lt; $1 &gt; $2<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">d.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">./phdfix.sh REV.xml REV_phdfix.xml</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> (names based on the reversal done
 above)<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">e.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">~/bin/epadmin erase_data ARCHIVEID
</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">Had some difficulty with
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">erase_eprints</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">, apparently some 'leftovers'. This blows away &amp; rebuilds the entire database.
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">f.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">~/bin/import_subjects ARCHIVEID</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:72.0pt;text-indent:-18.0pt;mso-list:l3 level2 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore">g.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">~/bin/import ARCHIVEID --enable-import-fields --enable-web-imports --update --force --verbose archive XML REV_phdfix.xml</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-108.0pt;mso-text-indent-alt:-9.0pt;mso-list:l3 level3 lfo2">
<![if !supportLists]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><span style="mso-list:Ignore"><span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>i.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">--update</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> overwrites
 older eprints w/the same ID instead of appending them to the end of the collection.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Once done, verify:<o:p></o:p></span></p>
<ol start="1" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo5">
<b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">NEWBox</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> :
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">~/bin/export ARCHIVEID archive XML &gt; NEW.xml</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo5">
<b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">OLDBox</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> :
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">~/bin/export ARCHIVEID archive XML &gt; OLD.xml</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo5">
<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">massage the files to get rid of known / OK differences
<o:p></o:p></span></li></ol>
<ol start="3" type="1">
<ul type="circle">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level2 lfo7">
<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">FILE
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sedsOld.sh</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></li></ul>
</ol>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">#!/bin/bash<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># clean up encoding changes<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">dos2unix $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># name change<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i 's!OLDURL!NEWURL!g' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># double to single quote<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i &quot;s/\&quot;/'/g&quot; $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># this appears in different spots in old &amp;amp; new formats<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i &quot;s! xmlns='http://eprints.org/ep2/data/2.0'!!&quot; $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># new format uses FQDN<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i 's!&lt;uri&gt;/id/document/!&lt;uri&gt;<a href="http://FQDN/id/document/">http://FQDN/id/document/</a>!' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># these ALL change - import increments them<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;rev_number&gt;.*&lt;\/rev_number&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># shows up in different spots than new format<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;mime_type&gt;application\/pdf&lt;\/mime_type&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># quite a few of these empties show in the old format, not the new<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;id&gt;&lt;\/id&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;reported_by&gt;&lt;\/reported_by&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;resolved_by&gt;&lt;\/resolved_by&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;comment&gt;&lt;\/comment&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># this is an entire multi-line section that lives in the old, but not in the new<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">perl -i -0pe 's/&lt;copies&gt;.*?&lt;\/copies&gt;/DELETEME/sg' $1 # can't easily delete; this replaces with literal DELETEME<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># Encoding of abstract has changed. Not always visibly obvious how (CRLFs, I think)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">#perl -i -0pe 's/&lt;abstract&gt;.*?&lt;\/abstract&gt;/DELETEME/sg' $1 # can't easily delete; this replaces with literal DELETEME<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/DELETEME/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># thesis type changes between the two versions<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;thesis_type&gt;phd&lt;\/thesis_type&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># old version encodes dashes; new version uses dashes<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i 's/%2D/-/g' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># old version encodes this; new version ignores???<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:90.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i 's/&amp;#13;//g' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:0cm;text-indent:0cm;mso-list:l1 level2 lfo7">
<![if !supportLists]><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">b.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">FILE
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sedsNew.sh</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">#!/bin/bash<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># clean up encoding changes<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">dos2unix $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># these ALL change - import increments them<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;rev_number&gt;.*&lt;\/rev_number&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># shows up in different spots than new format<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;mime_type&gt;application\/pdf&lt;\/mime_type&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># this appears in different spots in old &amp;amp; new formats<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i &quot;s! xmlns='http://eprints.org/ep2/data/2.0'!!&quot; $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># these are now encoded; old format was not<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i &quot;s/&amp;quot;/\'/g&quot; $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># these are now encoded; old format was not<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i &quot;s/&amp;apos;/\'/g&quot; $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># thesis type changes between the two versions<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;thesis_type&gt;phd&lt;\/thesis_type&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;thesis_type&gt;postdoctoral&lt;\/thesis_type&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/&lt;thesis_name&gt;phd&lt;\/thesis_name&gt;/d' $1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># Encoding of abstract has changed. Not always visibly obvious how (CRLFs, I think)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">perl -i -0pe 's/&lt;abstract&gt;.*?&lt;\/abstract&gt;/DELETEME/sg' $1 # can't easily delete; this replaces with DELETEME<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:54.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sed -i '/DELETEME/d' $1<o:p></o:p></span></p>
<ol start="1" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo7">
<span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">diff</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> the files and see what's left
<o:p></o:p></span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo7">
<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">This shows that
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">lastmod</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> is the date of import on the
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">NEW</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> file. To set it back to what it was:
<o:p></o:p></span></li></ol>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt;text-indent:-18.0pt;mso-list:l1 level2 lfo9">
<![if !supportLists]><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">A.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;
</span></span></span><![endif]><b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">OLDbox</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">:
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">echo 'SELECT CONCAT(&quot;update eprint set lastmod_year=&quot;,lastmod_year,&quot;, lastmod_month=&quot;,lastmod_month,&quot;, lastmod_day=&quot;,lastmod_day,&quot;, lastmod_hour=&quot;,lastmod_hour,&quot;, lastmod_minute=&quot;,lastmod_minute,&quot;,
 lastmod_second=&quot;,lastmod_second,&quot; WHERE eprintid=&quot;,eprintid,&quot;;&quot;) FROM eprint;' | mysql -u root -p ARCHIVEID &gt; lastmod.sql</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></p>
<ol start="2" type="1">
<ul type="circle">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level2 lfo9">
<span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">lastmod.sql</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">, get rid of first line (shows the command that created this file), and prepend the output
 with </span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">use ARCHIVEID;</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level2 lfo9">
<b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">NEWbox</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">:
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">mysql -u root -p &lt; lastmod.sql</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">
<o:p></o:p></span></li></ul>
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo9">
<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">REPEAT: Export new / run the seds on new / compare
<o:p></o:p></span></li></ol>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">How to migrate the users:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">*** BEGIN FILE: MigrateUsers.sh</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> ***<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">#/bin/bash<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">OLDBOX=IP_OR_FQDN<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">OLDMYSQLPWD=PASSWORDGOESHERE<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">NEWMYSQLPWD=PASSWORDGOESHERE<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">ssh root@${OLDBOX} &quot;sudo -u eprints /usr/share/eprints3/bin/export ARCHIVEID user XML&quot; &gt; oldboxusers.xml<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># HEREDOC to avoid quote escapement torture<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"># grep to remove the motd lines that get put in there<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">ssh root@${OLDBOX} &lt;&lt;HEREDOC | grep &quot;^update user set password.*&quot; &gt; oldboxpasswords.sql<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">mysql -u root -p${OLDMYSQLPWD} ARCHIVEID --skip-column-names -e 'select concat(&quot;update user set password=\&quot;&quot;, password, &quot;\&quot; where username=\&quot;&quot;, username, &quot;\&quot;;&quot;) from
 user;'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">HEREDOC<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">sudo -u eprints /usr/share/eprints3/bin/import ARCHIVEID user XML oldboxusers.xml<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">mysql -u root -p${NEWMYSQLPWD} ARCHIVEID &lt; oldboxpasswords.sql<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">rm oldboxpasswords.sql<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">rm oldboxusers.xml<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">*** END FILE: MigrateUsers.sh</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"> ***<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Sorry for some of the weird outline-autonumbering &nbsp;/ indentation &#8211; all of this was copied / pasted from my documentation wiki.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Good luck,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Dan Stieneke<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">IT Specialist<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">USDA - ARS - NWISRL<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">3793 N 3600 E<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Kimberly, ID 83341<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">208/423-6519<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,sans-serif">
<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a> [<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>]
<b>On Behalf Of </b>Andrew Beeken<br>
<b>Sent:</b> Friday, January 20, 2017 9:41 AM<br>
<b>To:</b> <a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><br>
<b>Subject:</b> [EP-tech] Migrating output data - most efficient way<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal">Hello all!<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">So, my quest to get the Lincoln repository onto a more standard EPrints install continues! Thanks for help with Ubuntu versions etc; I&#8217;ve now got that knowledge together and can start to look at the migration. I know I&#8217;ve asked this in
 the past, but my scope has changed slightly. Now, instead of looking at recreating our live repository like for like, I&#8217;m just looking at migrating the output data into a fresh EPrints installation and working from there.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I know I realistically have two options &#8211; importing from an EPrints XML dump off the main site or through a database dump. I&#8217;m assuming that in both cases I&#8217;ll need to bring over essential field definition, phrase and workflow files to
 avoid causing issues, and I&#8217;m assuming that, ideally, the database route would be best to make sure that any &#8220;in review&#8221; or hidden items are also brought across. Main qustions:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol">&middot;</span><span style="font-size:7.0pt;font-family:&quot;Times New Roman&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Am I right in this assumption?<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol">&middot;</span><span style="font-size:7.0pt;font-family:&quot;Times New Roman&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Can I JUST bring out a subset of tables for the deposit data or do I have to do a full database export? I&#8217;d ideally prefer to not do the latter as there are customisations to the user table in our live EPrints that I&#8217;m trying to avoid replicating in
 this new environment.<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol">&middot;</span><span style="font-size:7.0pt;font-family:&quot;Times New Roman&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Are there any gotchas I should be aware of?<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Thanks, as always, in advance!<o:p></o:p></p>
<p class="MsoNormal">Andrew<o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,serif"><br>
<b>The University of Lincoln, located in the heart of the city of Lincoln, has established an international reputation based on high student satisfaction, excellent graduate employment and world-class research.</b></span><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif"><br>
The information in this e-mail and any attachments may be confidential. If you have received this email in error please notify the sender immediately and remove it from your system. Do not disclose the contents to another person or take copies.<br>
<br>
Email is not secure and may contain viruses. The University of Lincoln makes every effort to ensure email is sent without viruses, but cannot guarantee this and recommends recipients take appropriate precautions.<br>
<br>
The University may monitor email traffic data and content in accordance with its policies and English law. Further information can be found at:
<a href="http://www.lincoln.ac.uk/legal">http://www.lincoln.ac.uk/legal</a>.</span><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif"><br>
<br>
<br>
<br>
This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil
 or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
<o:p></o:p></span></p>
</div>
</body>
</html>