如何在8.10版本中设置到S3的Solr备份

c86crjj0  于 2022-11-05  发布在  Solr
关注(0)|答案(1)|浏览(182)

我是solr的新手,如果我在这里遗漏了什么,请告诉我。我正在按照此指南操作,但目前还没有成功-https://solr.apache.org/guide/8_10/making-and-restoring-backups.html
我现在在solr.xml中添加了一个备份部分

<backup>
    <repository name="s3" class="org.apache.solr.s3.S3BackupRepository" default="false">
      <str name="s3.bucket.name">solr-backups</str>
      <str name="s3.region">us-east-1</str>
    </repository>
  </backup>

之后,我添加了S3插件(通过ansible,就像我通常做的那样)

- name: Copy SOLR S3 module to server
  copy:
    src: /opt/solr/dist/solr-s3-repository-8.10.1.jar
    dest: /opt/solr/server/solr/lib
    owner: solr
    group: solr
    remote_src: yes
  become_user: root

最后,在solr配置中添加了S3凭据

- name: Add aws credentials
  become_user: root
  lineinfile:
    path: /opt/solr/bin/solr.in.sh
    line: 'SOLR_OPTS="-Daws.accessKeyId=REDACTED -Daws.secretAccessKey=REDACTED"'

在重新启动Solr以应用所有新设置后,我将运行以下命令进行备份。

http://my-server.com:8983/solr/schools/replication?command=backup&name=29-10-2021&repository=s3&location=backupfolder

但接收到如下错误:

HTTP ERROR 500 java.lang.NoClassDefFoundError: org/apache/solr/core/backup/repository/BackupRepository
URI:    /solr/schools/replication
STATUS: 500
MESSAGE:    java.lang.NoClassDefFoundError: org/apache/solr/core/backup/repository/BackupRepository
SERVLET:    default
CAUSED BY:  java.lang.NoClassDefFoundError: org/apache/solr/core/backup/repository/BackupRepository
CAUSED BY:  java.lang.ClassNotFoundException: org.apache.solr.core.backup.repository.BackupRepository

Error message for solar backup on s3
你知道我的配置出了什么问题吗?

xesrikrc

xesrikrc1#

除了从dist/复制插件jar之外,您还必须从contrib/s3-repository/lib文件夹复制所有jar

相关问题