---
title: "GET /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups"
method: GET
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups"
tags: ["LongTermRetentionBackups"]
---

# GET /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups

`GET /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups`

Lists the long term retention backups for a given location.

## Path parameters

- `locationName` string, required
- `subscriptionId` string, required

## Query parameters

- `onlyLatestPerDatabase` boolean
- `databaseState` 'All' | 'Live' | 'Deleted'
- `api-version` string, required

## Response `200`

Successfully retrieved the list of backups.

- LongTermRetentionBackupListResult — A list of long term retention backups.
  - `value` LongTermRetentionBackup[] — Array of results. — unresolved $ref
  - `nextLink` string — Link to retrieve next page of results.

## Other responses

- `default` — *** Error Responses: *** * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription. * 404 SubscriptionDoesNotHaveServer - The requested server was not found

---

[API](https://skmtc.dev/azure/apis/sqlmanagementclient-40.md) · [All operations](https://skmtc.dev/azure/apis/sqlmanagementclient-40/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/sqlmanagementclient-40/revisions/f35db3621b18/schema)
