# How to Upgrade from 1.1.1 to 1.2.2 in a windows enviroment (as windows service)

**URL:** <https://discuss.elastic.co/t/how-to-upgrade-from-1-1-1-to-1-2-2-in-a-windows-enviroment-as-windows-service/18713>\
**Category:** Elasticsearch\
**Created:** [July 17, 2014, 7:02am UTC](https://discuss.elastic.co/t/how-to-upgrade-from-1-1-1-to-1-2-2-in-a-windows-enviroment-as-windows-service/18713 "2014-07-17T07:02:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wesley\_Creteur](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@Wesley\_Creteur](https://discuss.elastic.co/u/Wesley_Creteur)\
**Post date:** [July 17, 2014, 7:02am UTC](https://discuss.elastic.co/t/how-to-upgrade-from-1-1-1-to-1-2-2-in-a-windows-enviroment-as-windows-service/18713/1 "2014-07-17T07:02:36Z")

</div>

Hi,

I'm a recent user of elasticsearch and was wondering what steps i should  
take on upgrade to a newer version of elasticsearch on my windows server  
2012?

I've installed elasticsearch as running service on windows with the  
following commands: (3 nodes)

C:\Elasticsearch\elasticsearch-1.1.0\bin\service install node-01  
C:\Elasticsearch\elasticsearch-1.1.0\bin\service install node-02  
C:\Elasticsearch\elasticsearch-1.1.0\bin\service install node-03

Best regards

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6a4c4726-abb6-42ad-af56-9f9f889d7284%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6a4c4726-abb6-42ad-af56-9f9f889d7284%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [July 17, 2014, 7:51am UTC](https://discuss.elastic.co/t/how-to-upgrade-from-1-1-1-to-1-2-2-in-a-windows-enviroment-as-windows-service/18713/2 "2014-07-17T07:51:05Z")

</div>

Hi,

Remove the old service (service remove) then install it again using the new path.  
Going forward you might want to look into using file-system links (which Windows Vista + supports) so that you can make  
an alias  
to the folder, install the service for it and reuse that across installs.  
That is, install under c:\elasticsearch\current (which can point to 1.1.0, then 1.1.1, 1.2.2, etc...) while your service  
points to  
\current.  
Of course, you need to check whether each version introduces some changes into the init/stop script (does happen though  
rarely)  
and use that.

Cheers,

On 7/17/14 10:02 AM, Wesley Creteur wrote:

> Hi,
> 
> I'm a recent user of elasticsearch and was wondering what steps i should take on upgrade to a newer version of  
> elasticsearch on my windows server 2012?
> 
> I've installed elasticsearch as running service on windows with the following commands: (3 nodes)  
> |  
> C:\Elasticsearch\elasticsearch-1.1.0\bin\service install node-01  
> C:\Elasticsearch\elasticsearch-1.1.0\bin\service install node-02  
> C:\Elasticsearch\elasticsearch-1.1.0\bin\service install node-03  
> |
> 
> Best regards
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/6a4c4726-abb6-42ad-af56-9f9f889d7284%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6a4c4726-abb6-42ad-af56-9f9f889d7284%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/6a4c4726-abb6-42ad-af56-9f9f889d7284%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6a4c4726-abb6-42ad-af56-9f9f889d7284%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Costin

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/53C78069.3070902%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/53C78069.3070902%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![scamire](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scamire/32/1077_2.png) [@scamire](https://discuss.elastic.co/u/scamire)\
**Post date:** [December 3, 2014, 5:26pm UTC](https://discuss.elastic.co/t/how-to-upgrade-from-1-1-1-to-1-2-2-in-a-windows-enviroment-as-windows-service/18713/3 "2014-12-03T17:26:00Z")

</div>

Would setting up a symbolic link still necessitate re-installing the  
Windows service after each upgrade? I noticed that the service, when  
installed, contains version-specific information in places such as the  
display name and description.

IE:  
Elasticsearch 1.4.1 (node-01)  
Elasticsearch 1.4.1 Windows Service - [http://elasticsearch.org](http://elasticsearch.org)

Is there anything else (and possibly more important) that would make the  
Windows service more version-specific and necessitate re-installing it  
after every upgrade?

On Thursday, July 17, 2014 3:51:31 AM UTC-4, Costin Leau wrote:

> Hi,
> 
> Remove the old service (service remove) then install it again using the  
> new path.  
> Going forward you might want to look into using file-system links (which  
> Windows Vista + supports) so that you can make  
> an alias  
> to the folder, install the service for it and reuse that across installs.  
> That is, install under c:\elasticsearch\current (which can point to 1.1.0,  
> then 1.1.1, 1.2.2, etc...) while your service  
> points to  
> \current.  
> Of course, you need to check whether each version introduces some changes  
> into the init/stop script (does happen though  
> rarely)  
> and use that.
> 
> ## Cheers,
> 
> Costin

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8d94910a-6003-475e-bf9c-d670db61fa59%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8d94910a-6003-475e-bf9c-d670db61fa59%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![elvarb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elvarb/32/44840_2.png) [@elvarb](https://discuss.elastic.co/u/elvarb)\
**Post date:** [December 4, 2014, 11:49am UTC](https://discuss.elastic.co/t/how-to-upgrade-from-1-1-1-to-1-2-2-in-a-windows-enviroment-as-windows-service/18713/4 "2014-12-04T11:49:20Z")

</div>

Use NSSM ( [http://nssm.cc/](http://nssm.cc/) ) to create the service instead.

Organize your folders like this

C:\Elasticsearch  
C:\Elasticsearch\nssm.exe  
C:\Elasticsearch\elasticsearch.bat  
C:\Elasticsearch\elasticsearch-1.1.0  
C:\Elasticsearch\elasticsearch-1.2.2  
C:\Elasticsearch\data  
C:\Elasticsearch\logs  
C:\Elasticsearch....the other folders

in elasticsearch.bat only add the full path to the elasticsearch.bat that  
is included with each version, for example  
C:\Elasticsearch\elasticsearch-1.1.0\bin\elasticsearch.bat

Make sure your config has the folders C:\Elasticsearch\data defined

When upgrading, just add the new version in a folder, modify the bat in the  
root and restart the service.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/02085eb9-68a5-4d9d-8538-3504822a10c1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/02085eb9-68a5-4d9d-8538-3504822a10c1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [December 4, 2014, 12:23pm UTC](https://discuss.elastic.co/t/how-to-upgrade-from-1-1-1-to-1-2-2-in-a-windows-enviroment-as-windows-service/18713/5 "2014-12-04T12:23:54Z")

</div>

The version is used not just in the title and description but also in the starting script (to setup the classpath and such).  
This is done on purpose, to make sure the incorrect version is not loaded by accident (path rename, reinstall, etc...).  
You could use sym links but then you'd have to re-edit the startup scripts as well. It's simpler to reinstall the service:

service remove  
  
service install

On 12/3/14 7:26 PM, Steve Camire wrote:

> Would setting up a symbolic link still necessitate re-installing the Windows service after each upgrade? I noticed that  
> the service, when installed, contains version-specific information in places such as the display name and description.
> 
> IE:  
> Elasticsearch 1.4.1 (node-01)  
> Elasticsearch 1.4.1 Windows Service - [http://elasticsearch.org](http://elasticsearch.org)
> 
> Is there anything else (and possibly more important) that would make the Windows service more version-specific and  
> necessitate re-installing it after every upgrade?
> 
> On Thursday, July 17, 2014 3:51:31 AM UTC-4, Costin Leau wrote:
> 
> ```
> Hi,
> 
> Remove the old service (service remove) then install it again using the new path.
> Going forward you might want to look into using file-system links (which Windows Vista + supports) so that you can make
> an alias
> to the folder, install the service for it and reuse that across installs.
> That is, install under c:\elasticsearch\current (which can point to 1.1.0, then 1.1.1, 1.2.2, etc...) while your
> service
> points to
> \current.
> Of course, you need to check whether each version introduces some changes into the init/stop script (does happen though
> rarely)
> and use that.
> 
> Cheers,
> --
> Costin
> 
> ```
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/8d94910a-6003-475e-bf9c-d670db61fa59%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8d94910a-6003-475e-bf9c-d670db61fa59%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/8d94910a-6003-475e-bf9c-d670db61fa59%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8d94910a-6003-475e-bf9c-d670db61fa59%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Costin

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5480525A.6070800%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/5480525A.6070800%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:45am UTC](https://discuss.elastic.co/t/how-to-upgrade-from-1-1-1-to-1-2-2-in-a-windows-enviroment-as-windows-service/18713/6 "2017-07-06T00:45:59Z")

</div>


