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=2026-10-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 |
The request has succeeded. Headers x-ms-request-id: string |
|
| 202 Accepted |
The request has been accepted for processing, but processing has not yet completed. Headers
|
|
| Other Status Codes |
Custom error response for the service. Headers
|
Security
azure_auth
Azure Active Directory 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=2026-10-01
{
"backupSettings": {
"backupName": "exampleltrbackup"
},
"targetDetails": {
"sasUriList": [
"sasuri"
]
}
}
Sample response
{
"properties": {
"backupMetadata": "backupmetadata",
"dataTransferredInBytes": 23,
"datasourceSizeInBytes": 23,
"endTime": "2025-06-01T18:35:22.123Z",
"percentComplete": 100,
"startTime": "2025-06-01T18:30:22.123Z",
"status": "Running"
}
}
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=2026-10-01
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westcentralus/operationResults/ffc80e91-03db-4534-b5de-bacb77aa6a81?api-version=2026-10-01
Definitions
| Name | Description |
|---|---|
|
Backup |
Settings for the long term backup. |
|
Backups |
Request 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 enumeration indicating the status of operation. |
BackupSettings
Settings for the long term backup.
| Name | Type | Description |
|---|---|---|
| backupName |
string |
Backup Name for the current backup |
BackupsLongTermRetentionRequest
Request 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 |
Error code. |
| properties.errorMessage |
string |
Error message. |
| properties.percentComplete |
number (double) minimum: 0maximum: 100 |
Percentage completed. |
| 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[] (password) |
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 enumeration indicating the status of operation.
| Value | Description |
|---|---|
| Running |
Operation is currently running. |
| Cancelled |
Operation has been cancelled. |
| Failed |
Operation has failed. |
| Succeeded |
Operation has succeeded. |