<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 id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Brian,</p>
<p><br>
</p>
<p>This is what I do (in brief):</p>
<p><br>
</p>
<p>1) Reduce the TTL on the repository DNS name to something like 5 minutes</p>
<p><br>
</p>
<p>2) &quot;Freeze&quot; the old repository - prevent users logging in and changing records</p>
<p><br>
</p>
<p>3) Migrate the repository to the new server - I use rsync to transfer the code and documents tree and mysqldump to transfer a snapshot of the database</p>
<p><br>
</p>
<p>After rsyncing, don't forget to remove any code changes that you added in step 2 (ie. you don't want the new repository to be frozen).</p>
<p><br>
</p>
<p>4) On the new server, increase&nbsp;the accessid counter&nbsp;eg.</p>
<p><br>
</p>
<p>mysql&gt;&nbsp;update counters set counter=10000000 where countername=&quot;accessid&quot;;</p>
<p><br>
</p>
<p>The idea is to leave a &quot;gap&quot; in the access table for any downloads that occur during the migration, so round up the counter to a suitably high value.</p>
<p><br>
</p>
<p>5) Test that everything is working on the new server (add an entry to your /etc/hosts so you can access it using the repository URL)</p>
<p><br>
</p>
<p>Remember to remove the entry from /etc/hosts afterwards!</p>
<p><br>
</p>
<p>6) Change DNS to point to the new server</p>
<p><br>
</p>
<p>Within a few minutes traffic will start to hit the new server - your&nbsp;users will now be using the new server. Any new downloads will start from accessid 10000000 (or whatever you set the accessid counter to in step 4).</p>
<p><br>
</p>
<p>Some services (crawlers etc.) seem to cache DNS entries for up to 24&#43; hours so expect traffic to continue hitting your old server for a while.</p>
<p><br>
</p>
<p>7) Update access table on new server</p>
<p><br>
</p>
<p>During the migration/DNS caching period both the old and new servers will have been accumulating downloads in their respective access tables.</p>
<p><br>
</p>
<p>But - as we increased the accessid counter on the new server we can merge the old access table into the new without accessids clashing.</p>
<p><br>
</p>
<p>Dump the access table from the old server and copy it to the new server.</p>
<p><br>
</p>
<p>Create a new database on the new server and import the access table into it:</p>
<p><br>
</p>
<p>mysqladmin create tmp_access_update;</p>
<p>mysql tmp_access_update &lt; access_table_from_old.sql</p>
<p><br>
</p>
<p>Then merge the tables:</p>
<p><br>
</p>
<p>mysql&gt; use new;</p>
<p>mysql&gt; select max(accessid) from access where accessid &lt; 10000000; # or whatever you set the accessid counter to in step 4</p>
<p>6782323 # the highest accessid we imported from the old server</p>
<p><br>
</p>
<p>mysql&gt; use tmp_access_update; # data from old server</p>
<p>mysql&gt; select max(accessid) from access;</p>
<p>6791234 # compare to above - old server has accumulated data since we took the snapshot</p>
<p>mysql&gt; insert into new.access values (select * from tmp_access_update.access where accessid&gt;<span style="font-size: 12pt;">6782323); # inserts 6782324-6791234</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">8) Restore the TTL on the DNS - at some point later</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">Hope that helps,</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">Tim</span></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<div><strong style="color:rgb(33,33,33); font-family:'Times New Roman',serif"><span style="font-size:11pt; font-family:Calibri,sans-serif; color:rgb(31,73,125)">Timothy Miles-Board</span></strong><br>
</div>
<div>
<p class="x_MsoNormal" style="margin:0cm 0cm 0.0001pt; font-size:16px; font-family:'Times New Roman',serif; color:rgb(33,33,33); background-color:rgb(255,255,255)">
<span style="font-size:10pt; font-family:Calibri,sans-serif; font-variant:small-caps; color:rgb(31,73,125); letter-spacing:1pt">Web &amp; Repositories Development Specialist, University of London Computer&nbsp;Centre</span><strong><span style="font-size:10pt; font-family:Calibri,sans-serif; color:rgb(31,73,125)"></span></strong></p>
<p class="x_MsoNormal" style="margin:0cm 0cm 0.0001pt; font-size:16px; font-family:'Times New Roman',serif; color:rgb(33,33,33); background-color:rgb(255,255,255)">
<span style="font-size:11pt; font-family:Calibri,sans-serif; color:rgb(31,73,125)">020 7863 1342&nbsp; |&nbsp; 07742 970 351&nbsp; |&nbsp;</span><span style="font-size:11pt; font-family:Calibri,sans-serif; color:rgb(22,139,186)"><a href="mailto:timothy.miles-board@london.ac.uk" target="_blank">timothy.miles-board@london.ac.uk</a>&nbsp;|
 @drtjmb</span><span style="font-size:11pt; font-family:Calibri,sans-serif; color:rgb(31,73,125)"></span></p>
<p class="x_MsoNormal" style="margin:0cm 0cm 0.0001pt; font-size:16px; font-family:'Times New Roman',serif; color:rgb(33,33,33); background-color:rgb(255,255,255)">
<span style="font-size:10pt; font-family:Calibri,sans-serif; color:rgb(31,73,125)">The University of London is an exempt charity in England and Wales</span></p>
</div>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> eprints-tech-bounces@ecs.soton.ac.uk &lt;eprints-tech-bounces@ecs.soton.ac.uk&gt; on behalf of Brian D. Gregg &lt;bdgregg@pitt.edu&gt;<br>
<b>Sent:</b> 03 September 2015 7:55 PM<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> [EP-tech] Re: Temporarily Disabling Deposits/Edits during migration/upgrade.</font>
<div>&nbsp;</div>
</div>
<div>
<div>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#1F497D">Peter, John,</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#1F497D">&nbsp;</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#1F497D">Both are very good answers, and yes the access table will continue to grow.&nbsp; We’ll have to determine if the access table growth will be a concern as obviously it will affect our
 IRstats install.</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#1F497D">&nbsp;</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#1F497D">Thanks again.</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#1F497D">&nbsp;</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#1F497D">-Brian.</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<a name="_MailEndCompose"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#1F497D">&nbsp;</span></a></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<b><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif"> eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>On Behalf Of </b>John Salter<br>
<b>Sent:</b> Thursday, September 03, 2015 2:23 PM<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> [EP-tech] Re: Temporarily Disabling Deposits/Edits during migration/upgrade.</span></p>
</div>
</div>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
&nbsp;</p>
<div id="divtagdefaultwrapper">
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">Hi Brian,</span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">In the past I've been advised to alter the user_login method to return 0 (so no one can log in), and then to remove the login tickets (so current sessions aren't valid).</span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">This approach obviously depends on what login methods you've got configured for your repository.</span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">Also worth noting that&nbsp;the access table will continue to grow even if people can't do stuff...</span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">Cheers,</span></p>
<p style="background:white"><span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">John</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; background: white;">
<span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
<div>
<div align="center" style="text-align: center; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; background: white;">
<span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">
<hr size="2" width="98%" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; background: white;">
<b><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">From:</span></b><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">
<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" style="color: blue; text-decoration: underline;">
eprints-tech-bounces@ecs.soton.ac.uk</a> &lt;<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" style="color: blue; text-decoration: underline;">eprints-tech-bounces@ecs.soton.ac.uk</a>&gt; on behalf of Brian D. Gregg &lt;<a href="mailto:bdgregg@pitt.edu" style="color: blue; text-decoration: underline;">bdgregg@pitt.edu</a>&gt;<br>
<b>Sent:</b> 03 September 2015 17:27<br>
<b>To:</b> 'eprints-tech@ecs.soton.ac.uk'<br>
<b>Subject:</b> [EP-tech] Temporarily Disabling Deposits/Edits during migration/upgrade.</span><span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">
</span></p>
<div>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; background: white;">
<span style="font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
</div>
</div>
<div>
<div>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">All,</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">Sorry if this may be repeat question to the list but I’m not finding what I believe I’m looking for in the archives.</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">We will be migrating our EPrints system from one system to another and performing and upgrade in the process.&nbsp; We’d like to keep the initial system up
 while we do so.&nbsp; However, we want to disable any additional deposits/changes to the system while the migration is happening but want to keep the system up for viewing, searching, etc. &nbsp;&nbsp;Due to the amount of content and the upgrade we’ll also be doing this
 will take at a minimum of 4 hours.&nbsp; My initial thought is to comment out the permissions in the user_roles.pl file that apply and restart the web server to “lockout” any user updates.&nbsp; If this approach is used what is minimum permissions needed to allow basic
 use/functionality by the user?&nbsp; Is it just “general”?</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">Is this the correct approach or is there something simpler that we can do to achieve the same functionality?
</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">Or would it be highly recommended to block the whole site while the migration is happening?</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">Thoughts, experiences?</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">Thanks,</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">Brian.</span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
<p style="background:white"><b><span style="font-size:18.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#323E4F">Brian D. Gregg</span></b><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black"></span></p>
<p style="background:white"><i><span style="font-size:14.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#323E4F">Solutions Architect
</span></i><span style="font-size:14.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#323E4F">|<i> Manager Systems Development</i></span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black"></span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#323E4F">University of Pittsburgh | University Library System</span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black"></span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#323E4F">Address:
<a href="https://maps.google.com/maps?q=7500&#43;Thomas&#43;Blvd,&#43;Pittsburgh,&#43;PA&amp;hl=en&amp;sll=41.117935,-77.604698&amp;sspn=7.662465,13.73291&amp;oq=7500&#43;Tho&amp;t=h&amp;hnear=7500&#43;Thomas&#43;Blvd,&#43;Pittsburgh,&#43;Pennsylvania&#43;15208&amp;z=17" target="_blank" style="color: blue; text-decoration: underline;">
<span style="color:#0563C1">7500 Thomas Blvd.&nbsp; Room 129 Pittsburgh, PA 15208</span></a></span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black"></span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:#17365D">Tel: (412) 648-3264 | Email:
<a href="mailto:bdgregg@pitt.edu" style="color: blue; text-decoration: underline;">
<span style="color:#0563C1">bdgregg@pitt.edu</span></a> | Fax: (412) 648-3585</span><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black"></span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,sans-serif; color:black">&nbsp;</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>