0
votes

I am running Solr as stand alone mode and its version is 6.6.6. I have to shift this index to another Solr instance (same version) that is running in cloud mode. I have taken backup of core from old solr using replication API. For restoring on new Solr (cloud mode), I have got following exception:

java.nio.file.NoSuchFileException:java.nio.file.NoSuchFileException: /home/user/search/import-index/snapshot.abc-21-10-2020/backup.properties

Same configuration on Zookeeper is already deployed from old Solr to new one. What is the issue with this approach ? How to solve this issue ?

1

1 Answers

0
votes

I had similar scenario with solr:8.5.2 and sadly is not possible to restore a core backup to a collection, but I did with following steps:

  • core backup with replication handler:
curl 'HOST:8983/solr/CORE/replication?command=backup&name=backup-XXX&core=CORE&location=/tmp' -H 'Content-type:application/json'
  • create collection with shard 1 (if you need more, you can use split shard later)
solr create -c XXX [-d /your/configsets/if/any ] -shards 1
  • stop solr
  • delete everything but core.properties, index empty dir in SOLR_DATA/XXX_shard1_replica_nY, e.g.
cd /var/solr/data/XXX_shard1_replica_n1
rm -rf index/* snapshot_metadata  tlog
  • copy core backup in SOLR_DATA/index/
cp snapshot.backup-XXX/* SOLR_DATA/index/
  • start solr, you should have data restored