> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# Exclude Volume from Backup

PATCH https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/resources/{id}/volumes/{volumeId}/exclude

Excludes an EC2-attached EBS volume from being backed up by Eon.

You can cancel this action by calling [Cancel Volume Backup Exclusion](cancel-volume-backup-exclusion) for the same volume.

Root volumes can't be excluded.


Reference: https://docs.eon.io/api/api-reference/resources/volume-backup-exclusion/exclude-volume-from-backup

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `projectId` (string, required) — ID of the project the resource is in. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.
- `id` (string, required) — Eon-assigned ID of the EC2 instance the volume is attached to.
- `volumeId` (string, required) — AWS-assigned ID of the EBS volume to exclude from backup. The volume must be attached to the instance specified in `id` and must not be the root volume.

## Response

### 200

Volume excluded from backup.

- `isExcluded` (boolean, required) — Whether the resource is excluded from backup. Expected to be `true`.

## Errors

### 400 Bad Request Error

Invalid request. Typically this indicates invalid ID formats, or that a non-EC2 resource, non-EBS volume, or root volume was specified in the request.

- `any`

### 404 Not Found Error

Resource or volume wasn't found.

- `any`

## Examples

**Response**

```json
{
  "isExcluded": true
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/resources/1ee34dc5-0a7c-4e56-a820-917371e05c8d/volumes/vol-049df61146c064d1c/exclude"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/resources/1ee34dc5-0a7c-4e56-a820-917371e05c8d/volumes/vol-049df61146c064d1c/exclude';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/resources/1ee34dc5-0a7c-4e56-a820-917371e05c8d/volumes/vol-049df61146c064d1c/exclude")
  .header("Authorization", "Bearer <token>")
  .asString();
```