# dokploy_volume_backup (Data Source)

Looks up a volume backup schedule of a service that already exists in Dokploy:

```terraform
data "dokploy_volume_backup" "data" {
  service_id   = data.dokploy_application.web.id
  service_type = "application"
  name         = "data-volume"
}
```

~> Dokploy does not enforce uniqueness for this record. If two volume backup records match the lookup attributes, this data source fails instead of a guess. Look the record up by `id` in that case.

## Example Usage

```terraform
data "dokploy_volume_backup" "example" {
  id = "your-volume-backup-id"
}

data "dokploy_volume_backup" "data" {
  service_id   = data.dokploy_application.web.id
  service_type = "application"
  name         = "data-volume"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `id` (String) Volume backup id. Set it for a lookup by id, or leave it unset and set `service_id` with the distinguishing attributes.
- `name` (String) Display name of the volume backup.
- `service_id` (String) Id of the service that owns the volume backup. Set it with `service_type` and `name`.
- `service_type` (String) Type of the service: `application`, `compose`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis` or `libsql`.

### Read-Only

- `app_name` (String) Internal name of the volume backup.
- `created_at` (String) Creation timestamp from the server.
- `cron_expression` (String) Cron expression of the backup schedule.
- `destination_id` (String) Id of the destination that stores the backup.
- `enabled` (Boolean) Whether the backup runs.
- `keep_latest_count` (Number) Number of backups to keep, or null to keep all.
- `prefix` (String) Prefix of the backup files in the destination.
- `service_name` (String) Compose service name, or null.
- `turn_off` (Boolean) Whether Dokploy stops the service during the backup.
- `volume_name` (String) Name of the volume to back up.