我们正在将Solr 8.2.0作为具有多个内核的独立系统运行。为了测试备份,我使用了以下命令:
sudo -u solr curl 'http://localhost:8983/solr/debt/replication?command=backup&lo
cation=/tmp/solrbackups/debt/'
我从以下命令获得的响应:
sudo -u solr curl 'http://localhost:8983/solr/debt/replication?command=details&wt=xml'
是:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">3</int>
</lst>
<str name="status">OK</str>
<lst name="details">
<str name="indexSize">119 bytes</str>
<str name="indexPath">/var/solr/data/debt/data/restore.20191211201823908</str>
<arr name="commits">
<lst>
<long name="indexVersion">1576093177904</long>
<long name="generation">1233</long>
<arr name="filelist">
<str>segments_y9</str>
</arr>
</lst>
</arr>
<str name="isMaster">true</str>
<str name="isSlave">false</str>
<long name="indexVersion">1576093177904</long>
<long name="generation">1233</long>
<lst name="master">
<arr name="replicateAfter">
<str>commit</str>
</arr>
<str name="replicationEnabled">true</str>
</lst>
</lst>
</response>
然后我运行了一条delete命令,以测试使用以下方法从备份中还原索引:
sudo -u solr curl http://localhost:8983/solr/debt/update -H "Content-type: text/xml" --data-binary '<delete><query>*:*</query></delete>'
然后我通过/etc/init.d/solr stop | start停止并启动了Solr
当我运行以下命令时:
sudo -u solr curl 'http://localhost:8983/solr/debt/replication?command=restore&location=/tmp/solrbackups/debt/'
我从命令行获得了状态确认。
但是当我使用Web API查看核心时,它表明没有文档。
还有其他人有这个问题吗?