On 9/27/23 02:16, Jim Morgan wrote:
OK, so I had some more time to work on this. I removed version 9.3 and
tried with version 8.11. But still the same story: any of the API restore
methods I try are rejected.

I have also tried stopping solr, copying the whole
/var/solr/data/collectionname directory from old server to new server, and
restarting. Nothing happens. The core doesn't appear on the new server.

Manually creating /var/solr/data/collectionname and copying the conf
directory into it doesn't do anything either.

I have also tried creating a core on the new server. That also fails as it
can't find solrconfig.xml, but does create a /var/solr/data/corename
directory.

On creating a core using the CoreAdmin API, see the large "warning" box (the red triangle) here:

https://solr.apache.org/guide/8_11/coreadmin-api.html#coreadmin-create

If you are NOT running in SolrCloud mode, then you should be able to simply copy a core directory from another system, and as long as the place you put it is right under the Solr Home and it contains a valid core.properties file, Solr should find it once restarted. If a core is detected, and there are any problems encountered during that process, there should be WARN or ERROR entries in solr.log giving at least minimal information about what went wrong.

The Solr Home is not the home directory of the solr user, it is a setting provided to Solr on startup.

The solr home location gets logged in solr.log.  From my install:

2023-09-27 23:59:31.718 INFO (main) [ ] o.a.s.s.CoreContainerProvider Solr Home: /var/solr/data (source: system property: solr.solr.home)

What does your solr.log file contain?

There are some other settings that can change how Solr places core data, one of them being the Solr Data Home. If you don't fully understand how that setting works, I recommend not using it.

If you are running in cloud mode (which you can tell in 9.x by the presence of the Cloud and Collections tabs in the admin UI), then ignore everything I wrote above. You can't just drop a core directory when Solr is in cloud mode and expect it to work. In fact, if you do this on a Solr version before 9.3.0, SolrCloud will actually DELETE any core directory that you add in this way as soon as you restart Solr.

Here is a log file for startup on my install, which IS running in cloud mode:

https://paste.elyograg.org/view/c5ba97a3

Line 12 is the one showing the solr home.
Lines 70 and 71 shows it detecting the core.
Lines 72 through 80 show it loading config resources.
Line 81 is showing the core actually being opened.
Lines 82 and 87 are related to security.json
Lines 83 through 86 are jetty finalizing its startup.
Lines 88 through 96 show the solrconfig/schema taking effect.
Line 97 shows that a new searcher is active for the core.
Lines 98 through the end show Solr interacting with ZK to update the cluster state.

A log generated by 8.11 would be different, especially if it's not running in cloud mode.

Thanks,
Shawn

Reply via email to