solr备份索引core数据需要先编辑对应的solrconfig.xml文件,一般路径在solrhome对应的集合目录里面,可以用find命令直接查找,
然后在其中添加Replication Handler的请求处理,具体如下:
<requestHandler name="/replication" class="solr.ReplicationHandler">
<lst>
<str name="replicateAfter">commit</str>
<str name="replicateAfter">startup</str>
<str name="confFiles">schema.xml,stopwords.txt</str>
</lst>
</requestHandler>
配置完需要重启solr,重启后通过浏览器执行备份操作,例如:
http://localhost:8983/solr/core/replication?command=backup,返回结果状态为OK,则表示备份成功。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15498/viewspace-2636678/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15498/viewspace-2636678/
本文详细介绍如何在Solr中配置备份与恢复机制。通过编辑solrconfig.xml文件并添加ReplicationHandler,可以实现索引数据的自动备份。重启Solr后,可通过HTTP请求触发备份流程,确保数据的安全性和完整性。
901

被折叠的 条评论
为什么被折叠?



