Share via


Backups (Long Term Retention - Part 1) - Trigger Ltr Pre Backup

Performs all checks required so that a subsequent long term retention backup operation succeeds.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup?api-version=2024-08-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

Responses

Name Type Description
200 OK

LtrPreBackupResponse

Ok. API finished synchronously with Success.

Headers

x-ms-request-id: string

Other Status Codes

ErrorResponse

Error Scenario 4xx/5xx

Headers

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

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

Sample_Prebackup

Sample request

POST https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver/ltrPreBackup?api-version=2024-08-01

{
  "backupSettings": {
    "backupName": "exampleltrbackup"
  }
}

Sample response

{
  "properties": {
    "numberOfContainers": 1
  }
}

Definitions

Name Description
BackupSettings

The settings for the long term backup.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

LtrPreBackupRequest

A request that is made for pre-backup.

LtrPreBackupResponse

Response for the LTR pre-backup API call

BackupSettings

The settings for the long term backup.

Name Type Description
backupName

string

Backup Name for the current backup

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.

LtrPreBackupRequest

A request that is made for pre-backup.

Name Type Description
backupSettings

BackupSettings

Backup Settings

LtrPreBackupResponse

Response for the LTR pre-backup API call

Name Type Description
properties.numberOfContainers

integer (int32)

Number of storage containers the plugin will use during backup. More than one containers may be used for size limitations, parallelism, or redundancy etc.