Backups Long Term Retention - Start
Initiates a long term retention backup.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup?api-version=2025-08-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
server
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)* |
The name of the server. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| backupSettings | True |
Backup Settings |
|
| targetDetails | True |
Backup store detail for target server |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK. Headers x-ms-request-id: string |
|
| 202 Accepted |
Accepted. Headers
|
|
| Other Status Codes |
Error response describing why the operation failed. Headers
|
Security
azure_auth
Microsoft Entra OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Initiate a long term retention backup.
Sample request
POST https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver/startLtrBackup?api-version=2025-08-01
{
"backupSettings": {
"backupName": "exampleltrbackup"
},
"targetDetails": {
"sasUriList": [
"sasuri"
]
}
}
Sample response
{
"properties": {
"datasourceSizeInBytes": 23,
"dataTransferredInBytes": 23,
"backupMetadata": "backupmetadata",
"status": "Running",
"startTime": "2025-06-01T18:30:22.123Z",
"endTime": "2025-06-01T18:35:22.123Z",
"percentComplete": 100
}
}
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westcentralus/operationResults/ffc80e91-03db-4534-b5de-bacb77aa6a81?api-version=2025-06-01-preview
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westcentralus/azureAsyncOperation/ffc80e91-03db-4534-b5de-bacb77aa6a81?api-version=2025-06-01-preview
Definitions
| Name | Description |
|---|---|
|
Backup |
The settings for the long term backup. |
|
Backups |
The request that is made for a long term retention backup. |
|
Backups |
Response for the LTR backup API call |
|
Backup |
Details about the target where the backup content will be stored. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Execution |
Service-set extensible enum indicating the status of operation |
BackupSettings
The settings for the long term backup.
| Name | Type | Description |
|---|---|---|
| backupName |
string |
Backup Name for the current backup |
BackupsLongTermRetentionRequest
The request that is made for a long term retention backup.
| Name | Type | Description |
|---|---|---|
| backupSettings |
Backup Settings |
|
| targetDetails |
Backup store detail for target server |
BackupsLongTermRetentionResponse
Response for the LTR backup API call
| Name | Type | Description |
|---|---|---|
| properties.backupMetadata |
string |
Metadata to be stored in RP. Store everything that will be required to perform a successful restore using this Recovery point. e.g. Versions, DataFormat etc |
| properties.backupName |
string |
Name of Backup operation |
| properties.dataTransferredInBytes |
integer (int64) |
Data transferred in bytes |
| properties.datasourceSizeInBytes |
integer (int64) |
Size of datasource in bytes |
| properties.endTime |
string (date-time) |
End time of the operation. |
| properties.errorCode |
string |
The error code. |
| properties.errorMessage |
string |
The error message. |
| properties.percentComplete |
number (double) minimum: 0maximum: 100 |
PercentageCompleted |
| properties.startTime |
string (date-time) |
Start time of the operation. |
| properties.status |
Service-set extensible enum indicating the status of operation |
BackupStoreDetails
Details about the target where the backup content will be stored.
| Name | Type | Description |
|---|---|---|
| sasUriList |
string[] |
List of SAS uri of storage containers where backup data is to be streamed/copied. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
ExecutionStatus
Service-set extensible enum indicating the status of operation
| Value | Description |
|---|---|
| Running |
The operation is currently running. |
| Cancelled |
The operation was cancelled. |
| Failed |
The operation failed. |
| Succeeded |
The operation succeeded. |