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
resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

serverName
path True

string

minLength: 3
maxLength: 63
pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*

The name of the server.

subscriptionId
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

BackupSettings

Backup Settings

targetDetails True

BackupStoreDetails

Backup store detail for target server.

Responses

Name Type Description
200 OK

BackupsLongTermRetentionResponse

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

  • Azure-AsyncOperation: string
  • Location: string
  • Retry-After: integer
  • x-ms-request-id: string
Other Status Codes

ErrorResponse

Custom error response for the service.

Headers

  • x-ms-error-code: string
  • x-ms-request-id: string

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
BackupSettings

Settings for the long term backup.

BackupsLongTermRetentionRequest

Request made for a long term retention backup.

BackupsLongTermRetentionResponse

Response for the LTR backup API call

BackupStoreDetails

Details about the target where the backup content will be stored.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExecutionStatus

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

BackupSettings

Backup Settings

targetDetails

BackupStoreDetails

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: 0
maximum: 100

Percentage completed.

properties.startTime

string (date-time)

Start time of the operation.

properties.status

ExecutionStatus

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

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

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.