> For the complete documentation index, see [llms.txt](https://docs.datafy.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datafy.io/set-up-and-installation/upgrading-datafy.md).

# Upgrading Datafy

## Upgrading from Sensor to AutoScaler

Datafy **Sensor** and **AutoScaler** are both based on shared components, operating at different permission levels: Sensor is read-only, and AutoScaler can modify and create volumes.

If you already have Sensor installed and want to upgrade to AutoScaler, these permissions need to be updated, and additional components that manage the volume lifecycle need to be installed.

{% stepper %}
{% step %}
**Update IAM Role**

Update the IAM role you created when installing Datafy Sensor, using the AutoScaler permissions level in the [role template](/set-up-and-installation/datafy-installation/permissions-configuration.md).

{% hint style="info" %}
If you choose to create a new role and not update the existing one, make sure to update the role ARN in the Datafy app
{% endhint %}
{% endstep %}

{% step %}
**Install Datafy AutoScaler**

[Install Datafy AutoScaler](/set-up-and-installation/datafy-installation/installation.md) the same way you installed Sensor, using the AutoScaler version of the installation command.

{% hint style="info" %}
Contact us for the latest agent version before you upgrade
{% endhint %}
{% endstep %}
{% endstepper %}

## Upgrading Version of Existing Agent

### AutoScaler

You can upgrade the version of Datafy AutoScaler you have installed by running the [install command](/set-up-and-installation/datafy-installation/installation.md) with the new version you'd like to install. Volumes with active autoscaling and the data on them will continue to be available during the upgrade, with a short period of increased latency.

Before upgrading, you can check which version is already installed with the following:

{% tabs %}
{% tab title="EC2" %}
You can check which version is installed on your instance with the command:

```bash
sudo grep '^VERSION=' /etc/datafy/datafy.conf
```

{% endtab %}

{% tab title="K8s" %}
You can check which version is installed on your cluster with the command:

```bash
helm list --namespace datafy-agent
```

`CHART` shows the Helm chart version. The first part of `APP VERSION`, before the `_`, is the agent version.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can install a newer or older version this way, make sure to check which is the right one
{% endhint %}

If the new version includes a kernel module upgrade, it takes effect the next time the instance reboots or, in Kubernetes, the node is replaced. If you upgrade during a scheduled maintenance window, reboot the instance or replace the node afterward so the new kernel module is loaded.

{% hint style="warning" %}
On a Bottlerocket node whose local volume is autoscaling, replace the node instead of rebooting it. See [Bottlerocket Local Volumes](/how-it-works/autoscaler-on-kubernetes.md#bottlerocket-local-volumes).
{% endhint %}

### Sensor

Sensor is upgraded in the same way as [AutoScaler](#autoscaler).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.datafy.io/set-up-and-installation/upgrading-datafy.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
