cgspace-notes/docs/2023-12/index.html

463 lines
26 KiB
HTML
Raw Normal View History

2023-12-02 08:38:09 +01:00
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta property="og:title" content="December, 2023" />
<meta property="og:description" content="2023-12-01 There is still high load on CGSpace and I don&rsquo;t know why I don&rsquo;t see a high number of sessions compared to previous days in the last few weeks $ for file in dspace.log.2023-11-[23]*; do echo &#34;$file&#34;; grep -a -oE &#39;session_id=[A-Z0-9]{32}&#39; &#34;$file&#34; | sort | uniq | wc -l; done dspace.log.2023-11-20 22865 dspace.log.2023-11-21 20296 dspace.log.2023-11-22 19688 dspace.log.2023-11-23 17906 dspace.log.2023-11-24 18453 dspace.log.2023-11-25 17513 dspace.log.2023-11-26 19037 dspace.log.2023-11-27 21103 dspace.log.2023-11-28 23023 dspace.log.2023-11-29 23545 dspace." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2023-12/" />
<meta property="article:published_time" content="2023-12-01T08:48:36+03:00" />
2024-01-05 13:45:46 +01:00
<meta property="article:modified_time" content="2023-12-29T12:08:57+03:00" />
2023-12-02 08:38:09 +01:00
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="December, 2023"/>
<meta name="twitter:description" content="2023-12-01 There is still high load on CGSpace and I don&rsquo;t know why I don&rsquo;t see a high number of sessions compared to previous days in the last few weeks $ for file in dspace.log.2023-11-[23]*; do echo &#34;$file&#34;; grep -a -oE &#39;session_id=[A-Z0-9]{32}&#39; &#34;$file&#34; | sort | uniq | wc -l; done dspace.log.2023-11-20 22865 dspace.log.2023-11-21 20296 dspace.log.2023-11-22 19688 dspace.log.2023-11-23 17906 dspace.log.2023-11-24 18453 dspace.log.2023-11-25 17513 dspace.log.2023-11-26 19037 dspace.log.2023-11-27 21103 dspace.log.2023-11-28 23023 dspace.log.2023-11-29 23545 dspace."/>
2024-08-28 10:35:05 +02:00
<meta name="generator" content="Hugo 0.133.1">
2023-12-02 08:38:09 +01:00
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"headline": "December, 2023",
"url": "https://alanorth.github.io/cgspace-notes/2023-12/",
2023-12-29 10:08:57 +01:00
"wordCount": "1323",
2023-12-02 08:38:09 +01:00
"datePublished": "2023-12-01T08:48:36+03:00",
2024-01-05 13:45:46 +01:00
"dateModified": "2023-12-29T12:08:57+03:00",
2023-12-02 08:38:09 +01:00
"author": {
"@type": "Person",
"name": "Alan Orth"
},
"keywords": "Notes"
}
</script>
<link rel="canonical" href="https://alanorth.github.io/cgspace-notes/2023-12/">
<title>December, 2023 | CGSpace Notes</title>
<!-- combined, minified CSS -->
<link href="https://alanorth.github.io/cgspace-notes/css/style.c6ba80bc50669557645abe05f86b73cc5af84408ed20f1551a267bc19ece8228.css" rel="stylesheet" integrity="sha256-xrqAvFBmlVdkWr4F&#43;GtzzFr4RAjtIPFVGiZ7wZ7Ogig=" crossorigin="anonymous">
<!-- minified Font Awesome for SVG icons -->
<script defer src="https://alanorth.github.io/cgspace-notes/js/fontawesome.min.f5072c55a0721857184db93a50561d7dc13975b4de2e19db7f81eb5f3fa57270.js" integrity="sha256-9QcsVaByGFcYTbk6UFYdfcE5dbTeLhnbf4HrXz&#43;lcnA=" crossorigin="anonymous"></script>
<!-- RSS 2.0 feed -->
</head>
<body>
<div class="blog-masthead">
<div class="container">
<nav class="nav blog-nav">
<a class="nav-link " href="https://alanorth.github.io/cgspace-notes/">Home</a>
</nav>
</div>
</div>
<header class="blog-header">
<div class="container">
<h1 class="blog-title" dir="auto"><a href="https://alanorth.github.io/cgspace-notes/" rel="home">CGSpace Notes</a></h1>
<p class="lead blog-description" dir="auto">Documenting day-to-day work on the <a href="https://cgspace.cgiar.org">CGSpace</a> repository.</p>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-sm-8 blog-main">
<article class="blog-post">
<header>
<h2 class="blog-post-title" dir="auto"><a href="https://alanorth.github.io/cgspace-notes/2023-12/">December, 2023</a></h2>
<p class="blog-post-meta">
<time datetime="2023-12-01T08:48:36+03:00">Fri Dec 01, 2023</time>
in
<span class="fas fa-folder" aria-hidden="true"></span>&nbsp;<a href="/categories/notes/" rel="category tag">Notes</a>
</p>
</header>
<h2 id="2023-12-01">2023-12-01</h2>
<ul>
<li>There is still high load on CGSpace and I don&rsquo;t know why
<ul>
<li>I don&rsquo;t see a high number of sessions compared to previous days in the last few weeks</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ <span style="color:#66d9ef">for</span> file in dspace.log.2023-11-<span style="color:#f92672">[</span>23<span style="color:#f92672">]</span>*; <span style="color:#66d9ef">do</span> echo <span style="color:#e6db74">&#34;</span>$file<span style="color:#e6db74">&#34;</span>; grep -a -oE <span style="color:#e6db74">&#39;session_id=[A-Z0-9]{32}&#39;</span> <span style="color:#e6db74">&#34;</span>$file<span style="color:#e6db74">&#34;</span> | sort | uniq | wc -l; <span style="color:#66d9ef">done</span>
</span></span><span style="display:flex;"><span>dspace.log.2023-11-20
</span></span><span style="display:flex;"><span>22865
</span></span><span style="display:flex;"><span>dspace.log.2023-11-21
</span></span><span style="display:flex;"><span>20296
</span></span><span style="display:flex;"><span>dspace.log.2023-11-22
</span></span><span style="display:flex;"><span>19688
</span></span><span style="display:flex;"><span>dspace.log.2023-11-23
</span></span><span style="display:flex;"><span>17906
</span></span><span style="display:flex;"><span>dspace.log.2023-11-24
</span></span><span style="display:flex;"><span>18453
</span></span><span style="display:flex;"><span>dspace.log.2023-11-25
</span></span><span style="display:flex;"><span>17513
</span></span><span style="display:flex;"><span>dspace.log.2023-11-26
</span></span><span style="display:flex;"><span>19037
</span></span><span style="display:flex;"><span>dspace.log.2023-11-27
</span></span><span style="display:flex;"><span>21103
</span></span><span style="display:flex;"><span>dspace.log.2023-11-28
</span></span><span style="display:flex;"><span>23023
</span></span><span style="display:flex;"><span>dspace.log.2023-11-29
</span></span><span style="display:flex;"><span>23545
</span></span><span style="display:flex;"><span>dspace.log.2023-11-30
</span></span><span style="display:flex;"><span>21298
</span></span></code></pre></div><ul>
<li>Even the number of unique IPs is not very high compared to the last week or so:</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span># awk <span style="color:#e6db74">&#39;{print $1}&#39;</span> /var/log/nginx/<span style="color:#f92672">{</span>access,library-access,oai,rest<span style="color:#f92672">}</span>.log.1 | sort | uniq | wc -l
</span></span><span style="display:flex;"><span>17023
</span></span><span style="display:flex;"><span># awk <span style="color:#e6db74">&#39;{print $1}&#39;</span> /var/log/nginx/<span style="color:#f92672">{</span>access,library-access,oai,rest<span style="color:#f92672">}</span>.log.2.gz | sort | uniq | wc -l
</span></span><span style="display:flex;"><span>17294
</span></span><span style="display:flex;"><span># awk <span style="color:#e6db74">&#39;{print $1}&#39;</span> /var/log/nginx/<span style="color:#f92672">{</span>access,library-access,oai,rest<span style="color:#f92672">}</span>.log.3.gz | sort | uniq | wc -l
</span></span><span style="display:flex;"><span>22057
</span></span><span style="display:flex;"><span># awk <span style="color:#e6db74">&#39;{print $1}&#39;</span> /var/log/nginx/<span style="color:#f92672">{</span>access,library-access,oai,rest<span style="color:#f92672">}</span>.log.4.gz | sort | uniq | wc -l
</span></span><span style="display:flex;"><span>32956
</span></span><span style="display:flex;"><span># awk <span style="color:#e6db74">&#39;{print $1}&#39;</span> /var/log/nginx/<span style="color:#f92672">{</span>access,library-access,oai,rest<span style="color:#f92672">}</span>.log.5.gz | sort | uniq | wc -l
</span></span><span style="display:flex;"><span>11415
</span></span><span style="display:flex;"><span># awk <span style="color:#e6db74">&#39;{print $1}&#39;</span> /var/log/nginx/<span style="color:#f92672">{</span>access,library-access,oai,rest<span style="color:#f92672">}</span>.log.6.gz | sort | uniq | wc -l
</span></span><span style="display:flex;"><span>15444
</span></span><span style="display:flex;"><span># awk <span style="color:#e6db74">&#39;{print $1}&#39;</span> /var/log/nginx/<span style="color:#f92672">{</span>access,library-access,oai,rest<span style="color:#f92672">}</span>.log.7.gz | sort | uniq | wc -l
</span></span><span style="display:flex;"><span>12648
</span></span></code></pre></div><ul>
<li>It doesn&rsquo;t make any sense so I think I&rsquo;m going to restart the server&hellip;
<ul>
<li>After restarting the server the load went down to normal levels&hellip; who knows&hellip;</li>
</ul>
</li>
<li>I started trying to see how I&rsquo;m going to generate the fake statistics for the Alliance bitstream that was replaced
<ul>
<li>I exported all the statistics for the owningItem now:</li>
</ul>
</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ chrt -b <span style="color:#ae81ff">0</span> ./run.sh -s http://localhost:8081/solr/statistics -a export -o /tmp/stats-export.json -f <span style="color:#e6db74">&#39;owningItem:b5862bfa-9799-4167-b1cf-76f0f4ea1e18&#39;</span> -k uid
</span></span></code></pre></div><ul>
<li>Importing them into DSpace Test didn&rsquo;t show the statistics in the Atmire module, but I see them in Solr&hellip;</li>
</ul>
<h2 id="2023-12-02">2023-12-02</h2>
<ul>
<li>Export CGSpace to check for missing Initiative collection mappings</li>
<li>Start a harvest on AReS</li>
</ul>
2023-12-06 07:55:57 +01:00
<h2 id="2023-12-04">2023-12-04</h2>
<ul>
<li>Send a message to Altmetric support because the item IWMI highlighted last month still doesn&rsquo;t show the attention score for the Handle after I tweeted it several times weeks ago</li>
<li>Spent some time writing a Python script to fix the literal MaxMind City JSON objects in our Solr statistics
<ul>
<li>There are about 1.6 million of these, so I exported them using solr-import-export-json with the query <code>city:com*</code> but ended up finding many that have missing bundles, container bitstreams, etc:</li>
</ul>
</li>
</ul>
<pre tabindex="0"><code>city:com* AND -bundleName:[* TO *] AND -containerBitstream:[* TO *] AND -file_id:[* TO *] AND -owningItem:[* TO *] AND -version_id:[* TO *]
</code></pre><ul>
<li>(Note the negation to find fields that are missing)</li>
<li>I don&rsquo;t know what I want to do with these yet</li>
</ul>
<h2 id="2023-12-05">2023-12-05</h2>
<ul>
<li>I finished the <code>fix_maxmind_stats.py</code> script and fixed 1.6 million records and imported them on CGSpace after testing on DSpace 7 Test</li>
<li>Altmetric said there was a glitch regarding the Handle and DOI linking and they successfully re-scraped the item page and linked them
<ul>
<li>They sent me a list of current production IPs and I notice that some of them are in our nginx bot network list:</li>
</ul>
</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ <span style="color:#66d9ef">for</span> network in <span style="color:#66d9ef">$(</span>csvcut -c network /tmp/ips.csv | sed 1d | sort -u<span style="color:#66d9ef">)</span>; <span style="color:#66d9ef">do</span> grepcidr $network ~/src/git/rmg-ansible-public/roles/dspace/files/nginx/bot-networks.conf; <span style="color:#66d9ef">done</span>
</span></span><span style="display:flex;"><span>108.128.0.0/13 &#39;bot&#39;;
</span></span><span style="display:flex;"><span>46.137.0.0/16 &#39;bot&#39;;
</span></span><span style="display:flex;"><span>52.208.0.0/13 &#39;bot&#39;;
</span></span><span style="display:flex;"><span>52.48.0.0/13 &#39;bot&#39;;
</span></span><span style="display:flex;"><span>54.194.0.0/15 &#39;bot&#39;;
</span></span><span style="display:flex;"><span>54.216.0.0/14 &#39;bot&#39;;
</span></span><span style="display:flex;"><span>54.220.0.0/15 &#39;bot&#39;;
</span></span><span style="display:flex;"><span>54.228.0.0/15 &#39;bot&#39;;
</span></span><span style="display:flex;"><span>63.32.242.35/32 &#39;bot&#39;;
</span></span><span style="display:flex;"><span>63.32.0.0/14 &#39;bot&#39;;
</span></span><span style="display:flex;"><span>99.80.0.0/15 &#39;bot&#39;
</span></span></code></pre></div><ul>
<li>I will remove those for now so that Altmetric doesn&rsquo;t have any unexpected issues harvesting</li>
</ul>
2023-12-08 14:32:48 +01:00
<h2 id="2023-12-08">2023-12-08</h2>
<ul>
<li>Finalized the script to generate Solr statistics for Alliance research Mirjam
<ul>
<li>The script is <code>ilri/generate_solr_statistics.py</code></li>
<li>I generated ~3,200 statistics based on her records of the download statistics of <a href="https://hdl.handle.net/10568/131997">that item</a> and imported them on CGSpace</li>
</ul>
</li>
2023-12-09 07:55:16 +01:00
<li>Did some work on the DSpace 7 submission form</li>
2023-12-08 14:32:48 +01:00
<li>Peter asked for lists of affiliations, investors, and publishers to do some cleanups
<ul>
<li>I generated a list from a CSV export instead of doing it based on a SQL dump&hellip;</li>
</ul>
</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ csvcut -c <span style="color:#e6db74">&#39;cg.contributor.affiliation[en_US]&#39;</span> /tmp/initiatives.csv <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> | sed -e 1d -e &#39;s/^&#34;//&#39; -e &#39;s/&#34;$//&#39; -e &#39;s/||/\n/g&#39; -e &#39;/^$/d&#39; \
</span></span><span style="display:flex;"><span> | sort | uniq -c | sort -hr \
</span></span><span style="display:flex;"><span> | awk &#39;BEGIN { FS = &#34;^[[:space:]]+[[:digit:]]+[[:space:]]+&#34; } {print $2}&#39;\
</span></span><span style="display:flex;"><span> | sed -e &#39;1i cg.contributor.affiliation&#39; -e &#39;s/^\(.*\)$/&#34;\1&#34;/&#39; \
</span></span><span style="display:flex;"><span> &gt; /tmp/2023-12-08-initiatives-affiliations.csv
2023-12-09 07:55:16 +01:00
</span></span></code></pre></div><ul>
<li>Export a list of authors as well:</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>localhost/dspace7= ☘ \COPY (SELECT DISTINCT text_value AS &#34;dc.contributor.author&#34;, count(*) FROM metadatavalue WHERE dspace_object_id in (SELECT dspace_object_id FROM item) AND metadata_field_id = 3 GROUP BY &#34;dc.contributor.author&#34; ORDER BY count DESC) to /tmp/2023-12-08-authors.csv WITH CSV HEADER;
</span></span><span style="display:flex;"><span>COPY 102435
2023-12-12 12:57:07 +01:00
</span></span></code></pre></div><h2 id="2023-12-11">2023-12-11</h2>
<ul>
<li>Work on OpenRXV dependencies and podman a bit</li>
<li>Peter noticed that the statistics for this month are very very low on CGSpace
<ul>
<li>I don&rsquo;t know what is going on, perhaps it is related to me adjusting the nginx config last week?</li>
<li>Ah, it&rsquo;s probably because of the spider patterns I updated on 2023-11</li>
</ul>
</li>
</ul>
2023-12-18 21:15:27 +01:00
<h2 id="2023-12-16">2023-12-16</h2>
<ul>
<li>Export CGSpace to check for missing Initiative collection mappings</li>
<li>Start a harvest on AReS</li>
</ul>
<h2 id="2023-12-17">2023-12-17</h2>
<ul>
<li>Pull latest master branch for OpenRXV and deploy on the server
<ul>
<li>I threw away some changes in the tree regarding the Angular base ref, and it broke AReS</li>
<li>So note to self: we need to set the base ref in <code>frontend/Dockerfile</code> before building!</li>
</ul>
</li>
<li>Now Salem fixed the country map</li>
</ul>
<h2 id="2023-12-18">2023-12-18</h2>
<ul>
<li>Work a bit on the IFPRI-ISNAR archive from Leigh</li>
<li>More work on the DSpace 7 home page</li>
</ul>
2023-12-21 08:08:59 +01:00
<h2 id="2023-12-19">2023-12-19</h2>
<ul>
<li>More work on the DSpace 7 home page</li>
<li>The Alliance TIP team is testing deposits to the DSpace 7 REST API and getting an HTTP 500 error
<ul>
<li>In the DSpace logs I see this after they log in, create the item, and update the metadata:</li>
</ul>
</li>
</ul>
<pre tabindex="0"><code>2023-12-19 17:49:28,022 ERROR unknown unknown org.dspace.rest.Resource @ Something get wrong. Aborting context in finally statement.
</code></pre><ul>
<li>I found some messages on the dspace-tech mailing list suggesting this might be an old bug: <a href="https://groups.google.com/g/dspace-tech/c/My1GUFYFGoU/m/tS7-WAJPAwAJ">https://groups.google.com/g/dspace-tech/c/My1GUFYFGoU/m/tS7-WAJPAwAJ</a>
<ul>
<li>I restarted Tomcat and told the Alliance TIP team to try again</li>
</ul>
</li>
</ul>
<h2 id="2023-12-20">2023-12-20</h2>
<ul>
<li>The Alliance guys said that submitting via REST works now&hellip; sigh, so that&rsquo;s just some old DSpace 5/6 REST API bug</li>
<li>I lowercased all our AGROVOC keywords in <code>dcterms.subject</code> in SQL:</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>dspace=# BEGIN;
</span></span><span style="display:flex;"><span>BEGIN
</span></span><span style="display:flex;"><span>dspace=*# UPDATE metadatavalue SET text_value=LOWER(text_value) WHERE dspace_object_id IN (SELECT uuid FROM item) AND metadata_field_id=187 AND text_value ~ &#39;[[:upper:]]&#39;;
</span></span><span style="display:flex;"><span>UPDATE 462
</span></span><span style="display:flex;"><span>dspace=*# COMMIT;
</span></span><span style="display:flex;"><span>COMMIT
2023-12-29 10:08:57 +01:00
</span></span></code></pre></div><h2 id="2023-12-25">2023-12-25</h2>
<ul>
<li>Looking into <a href="https://solr.apache.org/guide/8_11/making-and-restoring-backups.html">Solr backups</a>
<ul>
<li>Since we are not running in Solr Cloud mode we need to use the replication endpoint for Solr standalone</li>
<li>This works:</li>
</ul>
</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ curl <span style="color:#e6db74">&#39;http://localhost:8983/solr/statistics/replication?command=backup&#39;</span>
</span></span><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span> &#34;responseHeader&#34;:{
</span></span><span style="display:flex;"><span> &#34;status&#34;:0,
</span></span><span style="display:flex;"><span> &#34;QTime&#34;:26},
</span></span><span style="display:flex;"><span> &#34;status&#34;:&#34;OK&#34;}
</span></span></code></pre></div><ul>
<li>Then I saw the size of the snapshot reach the size of the index&hellip;</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span># du -sh /var/solr/data/configsets/statistics/data/*
</span></span><span style="display:flex;"><span>22G /var/solr/data/configsets/statistics/data/index
</span></span><span style="display:flex;"><span>16G /var/solr/data/configsets/statistics/data/snapshot.20231225074111671
</span></span><span style="display:flex;"><span>4.0K /var/solr/data/configsets/statistics/data/snapshot_metadata
</span></span><span style="display:flex;"><span># du -sh /var/solr/data/configsets/statistics/data/*
</span></span><span style="display:flex;"><span>22G /var/solr/data/configsets/statistics/data/index
</span></span><span style="display:flex;"><span>20G /var/solr/data/configsets/statistics/data/snapshot.20231225074111671
</span></span><span style="display:flex;"><span>4.0K /var/solr/data/configsets/statistics/data/snapshot_metadata
</span></span><span style="display:flex;"><span># du -sh /var/solr/data/configsets/statistics/data/*
</span></span><span style="display:flex;"><span>22G /var/solr/data/configsets/statistics/data/index
</span></span><span style="display:flex;"><span>21G /var/solr/data/configsets/statistics/data/snapshot.20231225074111671
</span></span><span style="display:flex;"><span>4.0K /var/solr/data/configsets/statistics/data/snapshot_metadata
</span></span><span style="display:flex;"><span># du -sh /var/solr/data/configsets/statistics/data/*
</span></span><span style="display:flex;"><span>22G /var/solr/data/configsets/statistics/data/index
</span></span><span style="display:flex;"><span>22G /var/solr/data/configsets/statistics/data/snapshot.20231225074111671
</span></span><span style="display:flex;"><span>4.0K /var/solr/data/configsets/statistics/data/snapshot_metadata
</span></span></code></pre></div><ul>
<li>Then I deleted the core and restored from the snapshot backup:</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ curl http://localhost:8983/solr/statistics/update -H <span style="color:#e6db74">&#34;Content-type: text/xml&#34;</span> --data-binary <span style="color:#e6db74">&#39;&lt;delete&gt;&lt;query&gt;*:*&lt;/query&gt;&lt;/delete&gt;&#39;</span>
</span></span><span style="display:flex;"><span>$ curl http://localhost:8983/solr/statistics/update -H <span style="color:#e6db74">&#34;Content-type: text/xml&#34;</span> --data-binary <span style="color:#e6db74">&#39;&lt;commit /&gt;&#39;</span>
</span></span><span style="display:flex;"><span>$ curl <span style="color:#e6db74">&#39;http://localhost:8983/solr/statistics/replication?command=restore&amp;name=statistics&#39;</span>
</span></span></code></pre></div><ul>
<li>Interestingly the import worked fine, but created a new data index:</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span># du -sh /var/solr/data/configsets/statistics/data/*
</span></span><span style="display:flex;"><span>4.0K /var/solr/data/configsets/statistics/data/index.properties
</span></span><span style="display:flex;"><span>22G /var/solr/data/configsets/statistics/data/restore.20231225154626463
</span></span><span style="display:flex;"><span>4.0K /var/solr/data/configsets/statistics/data/snapshot_metadata
</span></span><span style="display:flex;"><span>22G /var/solr/data/configsets/statistics/data/snapshot.statistics
</span></span></code></pre></div><ul>
<li>Not sure the implications of that—Solr uses the data just fine</li>
<li>I can surely use this for atomic Solr backups</li>
</ul>
<h2 id="2023-12-27">2023-12-27</h2>
<ul>
<li>Delete duplicate metadata as described in my DSpace issue from last year: <a href="https://github.com/DSpace/DSpace/issues/8253">https://github.com/DSpace/DSpace/issues/8253</a></li>
<li>Do some other metadata cleanups on CGSpace
<ul>
<li>I also looked up our DOIs on Crossref to get some missing abstracts and correct licenses and dates</li>
</ul>
</li>
<li>Some minor work on the CGSpace DSpace 7 theme to fix the navbar on mobile</li>
<li>Some work on the IFPRI ISNAR archive</li>
</ul>
<h2 id="2023-12-28">2023-12-28</h2>
<ul>
<li>I started porting the <a href="https://github.com/ilri/cgspace-java-helpers">cgspace-java-helpers</a> to DSpace 7</li>
<li>Some work on the IFPRI ISNAR archive
<ul>
<li>I ended up going through most of the PDFs to get better dates and abstracts</li>
</ul>
</li>
</ul>
<h2 id="2023-12-29">2023-12-29</h2>
<ul>
<li>I created a new Hetzner server to replace the current DSpace 6 CGSpace next week when we migrate to DSpace 7</li>
<li>Interesting, I haven&rsquo;t checked for content pointing to legacy domains in several years (!)
<ul>
<li><code>inurl:mahider.cgiar.org</code>: 0 results on Google!</li>
<li><code>inurl:mahider.ilri.org</code>: 2,100 results on Google</li>
<li><code>inurl:mahider.ilri.org inurl:https</code>: 2 results on Google (!)</li>
<li><code>inurl:dspace.ilri.org:</code> 1,390 results on Google</li>
<li><code>inurl:dspace.ilri.org inurl:https</code>: 0 results on Google (!)</li>
</ul>
</li>
<li>So it seems I can do away with the HTTPS virtual hosts finally
<ul>
<li>Well my current certificates expired on 2021-02-13 and nobody noticed&hellip; so&hellip;</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
2023-12-02 08:38:09 +01:00
</article>
</div> <!-- /.blog-main -->
<aside class="col-sm-3 ml-auto blog-sidebar">
<section class="sidebar-module">
<h4>Recent Posts</h4>
<ol class="list-unstyled">
2024-12-04 14:27:49 +01:00
<li><a href="/cgspace-notes/2024-12/">December, 2024</a></li>
2024-11-19 08:40:23 +01:00
<li><a href="/cgspace-notes/2024-11/">November, 2024</a></li>
2024-10-03 10:51:44 +02:00
<li><a href="/cgspace-notes/2024-10/">October, 2024</a></li>
2024-09-09 09:20:09 +02:00
<li><a href="/cgspace-notes/2024-09/">September, 2024</a></li>
2024-08-28 10:35:05 +02:00
<li><a href="/cgspace-notes/2024-08/">August, 2024</a></li>
2023-12-02 08:38:09 +01:00
</ol>
</section>
<section class="sidebar-module">
<h4>Links</h4>
<ol class="list-unstyled">
<li><a href="https://cgspace.cgiar.org">CGSpace</a></li>
<li><a href="https://dspacetest.cgiar.org">DSpace Test</a></li>
<li><a href="https://github.com/ilri/DSpace">CGSpace @ GitHub</a></li>
</ol>
</section>
</aside>
</div> <!-- /.row -->
</div> <!-- /.container -->
<footer class="blog-footer">
<p dir="auto">
Blog template created by <a href="https://twitter.com/mdo">@mdo</a>, ported to Hugo by <a href='https://twitter.com/mralanorth'>@mralanorth</a>.
</p>
<p>
<a href="#">Back to top</a>
</p>
</footer>
</body>
</html>