> 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/volume-lifecycle/datafy-snapshots/offline-restoration-autoscaling.md).

# Offline Restoration - Autoscaling

The standard flow for restoring Datafy snapshots is through the Datafy `create-from-snapshots` and `attach` endpoints. In emergency cases when these endpoints are not available, you can use the manual attach tool to access data from volume created directly from Datafy snapshots,

The tool does not require any permissions on your AWS account.

{% hint style="warning" %}
The manual attach tool is intended to enable snapshot recovery in cases of emergency, and should not be used when the `create-from-snapshots` and `attach` endpoints are available

See [#limitations-of-volumes-that-were-manually-attached](#limitations-of-volumes-that-were-manually-attached "mention")
{% endhint %}

## Manual Attachment of Restored Datafy Snapshots

Before you get started, make sure you meet the following conditions:

1. Access to snapshots in the AWS console
2. SSH access and root/sudo permissions on an instance with Datafy Autoscaler installed where the volumes will be attached

{% stepper %}
{% step %}

#### Create new volumes from snapshots

* For a given source volume ID and desired timeframe, find all of the snapshots that have a matching `datafy:source-volume:id` tag and timestamp. All the snapshots should have the same `datafy:snapshot:id` tag, and all of snapshots with this tag should be used.
* Create new volumes from these snapshots through AWS, and attach them to the desired instance.
  {% endstep %}

{% step %}

#### Download and Run the Attach Tool

* Download and run the attach tool using the following command. Provide the volume IDs and device names of your volumes.

  <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">curl -sSfL https://artifacts.datafy.io/attach_tool | sh -s -- vol-04d316aeec130176a /dev/nvme1n1 vol-07b9a47caa69e90e2 /dev/nvme2n1
  </code></pre>

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>You can find the device name by running the <code>lsblk</code> command</p></div>

  \
  You will receive a new device path that can be used to access a single autoscaling volume with access to all of the data from the restored snapshots

  <pre data-overflow="wrap"><code>Generated source volume id: vol-01afc3a269acebaf9
  Volume attached successfully. New device path: /dev/datafy-vol-01afc3a269acebaf9
  </code></pre>

  * You can also download and run the tool in 2 steps using:

    ```bash
    curl -sSfL https://artifacts.datafy.io/attach_tool | sh
    ```

    and then:

    <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">sudo ./attach_tool vol-04d316aeec130176a /dev/nvme1n1 vol-07b9a47caa69e90e2 /dev/nvme2n1
    </code></pre>

{% endstep %}

{% step %}

#### Set up the Volume

Mount the volume using the device path provided by the attach tool output

```shellscript
mount /dev/datafy-vol-01afc3a269acebaf9 /mnt/data
```

Your volume is now set up and ready to use!
{% endstep %}
{% endstepper %}

### Limitations of Volumes That Were Manually Attached

{% hint style="warning" %}
Autoscaling Volumes that were created and attached using the flow above will have limited functionality until they are registered with Datafy. The volumes will continue to grow when needed, and the data on them will remain available.
{% endhint %}

Until your new volume is registered with Datafy, it will operate under the following limitations:

* **Appearance**: The volume will not appear in the Datafy app.
* **Autoscaling**: The volume will continue to grow, but will not automatically shrink
* **Additional Actions**: API actions for the volume will not be supported

{% hint style="success" %}
To restore full functionality, please contact us to register any volumes created this way.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.datafy.io/volume-lifecycle/datafy-snapshots/offline-restoration-autoscaling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
