You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by tedsolr <ts...@sciquest.com> on 2017/04/17 19:46:47 UTC

Moving solr home

I have a solr cloud cluster (v5.2.1 on redhat linux) that uses the default
location for solr home: (install dir)/server/solr. I would like to move the
index data somewhere else to make upgrades easier. When I set a SOLR_HOME
variable  solr appears to be ignoring it - and even creating a solr.xml file
in (install dir)/server/solr. Is solr doing some auto detect instead of
using the defined SOLR_HOME variable?

pre-reqs:
- copied all index data to new solr home
- placed a solr.xml file in new solr home
- set SOLR_HOME & SOLR_PID_DIR in (install dir)/bin/solr.in.sh
- deleted solr.xml from default solr home

then restart solr nodes:
- the admin console still shows solr.solr.home as default
- solr.xml gets recreated in the default solr home folder

Anyone know what I'm missing?



--
View this message in context: http://lucene.472066.n3.nabble.com/Moving-solr-home-tp4330350.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Moving solr home

Posted by Shawn Heisey <ap...@elyograg.org>.
On 4/18/2017 7:07 AM, tedsolr wrote:
> Looks like the issues are self inflicted. I have custom start/stop
> scripts that actually specify the solr home directory as a param to
> the start command (start -c -s ...). This was overriding my include
> variable. As for the magical solr.xml file, that's also my doing
> because as part of shutdown the script copies config files where they
> need to go. When I wrote all this 2 years ago I needed the flexibility
> to run multiple nodes on a single host (because requisitioning a
> server took an act of congress).

The service installer script works well for non-Windows systems, and has
one big advantage -- the people on this list will know exactly where
everything is if you are able to tell us the options you used on the
installer.  With custom scripts like what you wrote, we have no idea
where anything is.  The installer script defaults to separating the solr
home from the install dir.

I would strongly recommend using the service installer script if you're
not running on Windows.  It will create a user to run Solr so it's not
running as root.  You can install more than one instance using that
script.  Each one will get its own copy of the binaries.  Although it is
possible to run multiple instances out of one install directory, it does
require custom scripting.  The amount of disk space that separate
install directories use is usually very small compared to the indexes
and modern disk sizes.

Thanks,
Shawn


Re: Moving solr home

Posted by tedsolr <ts...@sciquest.com>.
Looks like the issues are self inflicted. I have custom start/stop scripts
that actually specify the solr home directory as a param to the start
command (start -c -s ...). This was overriding my include variable. As for
the magical solr.xml file, that's also my doing because as part of shutdown
the script copies config files where they need to go.

When I wrote all this 2 years ago I needed the flexibility to run multiple
nodes on a single host (because requisitioning a server took an act of
congress). 


Susheel Kumar-3 wrote
> Hi,
> 
> Did you try to utilise the service installation scripts to deploy.  This
> makes it very easy for Prod deployments and allows to decouple data/index
> directory with Solr binaries. See below link
> 
> https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production
> 
> Thanks,
> Susheel
> 
> On Mon, Apr 17, 2017 at 3:46 PM, tedsolr &lt;

> tsmith@

> &gt; wrote:
> 
>> I have a solr cloud cluster (v5.2.1 on redhat linux) that uses the
>> default
>> location for solr home: (install dir)/server/solr. I would like to move
>> the
>> index data somewhere else to make upgrades easier. When I set a SOLR_HOME
>> variable  solr appears to be ignoring it - and even creating a solr.xml
>> file
>> in (install dir)/server/solr. Is solr doing some auto detect instead of
>> using the defined SOLR_HOME variable?
>>
>> pre-reqs:
>> - copied all index data to new solr home
>> - placed a solr.xml file in new solr home
>> - set SOLR_HOME & SOLR_PID_DIR in (install dir)/bin/solr.in.sh
>> - deleted solr.xml from default solr home
>>
>> then restart solr nodes:
>> - the admin console still shows solr.solr.home as default
>> - solr.xml gets recreated in the default solr home folder
>>
>> Anyone know what I'm missing?
>>
>>
>>
>> --
>> View this message in context: http://lucene.472066.n3.
>> nabble.com/Moving-solr-home-tp4330350.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>





--
View this message in context: http://lucene.472066.n3.nabble.com/Moving-solr-home-tp4330350p4330489.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Moving solr home

Posted by Susheel Kumar <su...@gmail.com>.
Hi,

Did you try to utilise the service installation scripts to deploy.  This
makes it very easy for Prod deployments and allows to decouple data/index
directory with Solr binaries. See below link

https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production

Thanks,
Susheel

On Mon, Apr 17, 2017 at 3:46 PM, tedsolr <ts...@sciquest.com> wrote:

> I have a solr cloud cluster (v5.2.1 on redhat linux) that uses the default
> location for solr home: (install dir)/server/solr. I would like to move the
> index data somewhere else to make upgrades easier. When I set a SOLR_HOME
> variable  solr appears to be ignoring it - and even creating a solr.xml
> file
> in (install dir)/server/solr. Is solr doing some auto detect instead of
> using the defined SOLR_HOME variable?
>
> pre-reqs:
> - copied all index data to new solr home
> - placed a solr.xml file in new solr home
> - set SOLR_HOME & SOLR_PID_DIR in (install dir)/bin/solr.in.sh
> - deleted solr.xml from default solr home
>
> then restart solr nodes:
> - the admin console still shows solr.solr.home as default
> - solr.xml gets recreated in the default solr home folder
>
> Anyone know what I'm missing?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/Moving-solr-home-tp4330350.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>