# Elasticsearch Upgrade (Windows)

This article provides detailed instructions to upgrade Elasticsearch on a Windows environment. It includes all necessary preconditions, step-by-step upgrade actions, and post-upgrade validation procedures to ensure a reliable transition with minimal downtime and no data loss.

## **Prerequisites**

* Administrative access to the Windows system.
* A stable internet connection for downloading the upgrade package.
* Sufficient disk space to hold both the current and new Elasticsearch installations and their data.
* Backup of the following directories from the existing Elasticsearch installation:
  * `config`
  * `data`
  * `logs`

## **Upgrade Steps**

**Target Example:** Upgrade from version **7.17.26** to **7.17.28**.\
The same steps apply for similar version upgrades.

* **Stop the Existing Elasticsearch Service**
  * Press `Win + R`, type `services.msc`, and press **Enter**.
  * Locate the **Elasticsearch** service.
  * Right-click the service and select **Stop**.

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FcFbN49ltrvmLd3BR83wy%2Fimage.png?alt=media&#x26;token=facfcc31-144f-4019-af66-aa7012107d53" alt=""><figcaption></figcaption></figure>

* **Download the New Elasticsearch Version**
  * Download the `.zip` package for the new version:\
    [Elasticsearch 7.17.28 Windows x86\_64](https://ovaledge.s3.us-west-1.amazonaws.com/scripts/packages/elasticsearch-7.17.28-windows-x86_64.zip?utm_source=chatgpt.com)

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FsSAfWyZ6bm6DdFqT4POy%2Fimage.png?alt=media&#x26;token=c9a4123f-c225-4128-b9e6-f76580c6e092" alt=""><figcaption></figcaption></figure>

* **Extract the New Version**
  * Extract the `.zip` file to a new directory, for example:

    ```
    C:\elasticsearch-7.17.28
    ```

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2Fgiv0UJpniJiDb43zvMkh%2Fimage.png?alt=media&#x26;token=3805e1f5-9002-4314-8cdc-b304ce50e4cc" alt=""><figcaption></figcaption></figure>

* **Migrate Configuration and Data**
  * Copy the following from the old installation (e.g., `C:\elasticsearch-7.17.26`) :

    * `config\elasticsearch.yml`
    * `config\jvm.options`
    * Entire `data` directory

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FbuNPvTZLwovFP93mhHEw%2Fimage.png?alt=media&#x26;token=63528c71-8752-4143-8320-f40bb024331c" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2Ft7nNzEC3ow0R2dVtLhYi%2Fimage.png?alt=media&#x26;token=c20af087-4acc-467f-a736-0e8fdb5e9271" alt=""><figcaption></figcaption></figure>

* Paste them to the new installation (`C:\elasticsearch-7.17.28`)

  <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FIyhj6hjAZnEW1odQ0hZJ%2Fimage.png?alt=media&#x26;token=62437934-4329-48b2-8d7d-de9f04402260" alt=""><figcaption></figcaption></figure>

  <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FXcjgHbP7NcN7OdSYqpdU%2Fimage.png?alt=media&#x26;token=1c70ae26-997c-4907-9fba-d98d19567aa2" alt=""><figcaption></figcaption></figure>

* **Remove the Old Elasticsearch Windows Service**
  * Open **Command Prompt as Administrator**.
  * Navigate to the old installation’s `bin` directory and remove the service:

    ```cmd
    cd C:\elasticsearch-7.17.26\bin
    elasticsearch-service.bat remove
    ```

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FyhG3bxS1YIeADC9csfPP%2Fimage.png?alt=media&#x26;token=3d015ea1-6e00-4d76-a5fd-424799988efd" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FGe4NHx0nyJlsj8xGYBN5%2Fimage.png?alt=media&#x26;token=d6cda92c-1937-4359-9ca3-947e4e728bcd" alt=""><figcaption></figcaption></figure>

* **Install the New Version as a Windows Service**
  * From the same Command Prompt, navigate to the new installation’s `bin` directory and install the service:

    ```cmd
    cd C:\elasticsearch-7.17.28\bin
    elasticsearch-service.bat install
    ```

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FLeJX4vEuSo1GpE8oOWXX%2Fimage.png?alt=media&#x26;token=6caa955c-0f3c-4c34-915a-194239041f51" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2Fwz4zI3wfRtfhVoIv2Mb6%2Fimage.png?alt=media&#x26;token=53d5bcd6-7f83-48c4-ac57-6e68ecbcfd15" alt=""><figcaption></figcaption></figure>

* **Start the New Elasticsearch Service**
  * Open `services.msc`.
  * Locate the **Elasticsearch** service (now pointing to the new path).
  * Right-click the service and select **Start**.

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FfnXOiJ3tSQ8Jkq4wJEEz%2Fimage.png?alt=media&#x26;token=3f7d4ae4-8324-480e-9094-3f7d834ad400" alt=""><figcaption></figcaption></figure>

* **Verify the Upgrade**
  * Access the Elasticsearch API using a browser, `curl`, or Postman:<br>

    ```
    http://localhost:9200
    ```

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F1mNDhhXzOkEPcayO43Ae%2Fimage.png?alt=media&#x26;token=4c3103c1-d1ff-4c48-b2cf-70691c80f40d" alt=""><figcaption></figcaption></figure>
  * The response should include the upgraded version:<br>

    ```json
    {
      "name" : "YOUR-NODE-NAME",
      "cluster_name" : "elasticsearch",
      "cluster_uuid" : "xxxxxxxxxxxxxxxxx",
      "version" : {
        "number" : "7.17.28"
      }
    }article 
    ```

    <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FhoGgpfWY24IWf2p3S24Y%2Fimage.png?alt=media&#x26;token=724d26ce-56fe-4a76-87a1-74ac0f3640bd" alt=""><figcaption></figcaption></figure>

***

Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.
