# 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.&#x20;
  {% 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 %}
