Skip to main content

Restoring a deleted postgres flexible server

You can find detailed instructions on restoring a dropped Postgres flexible server instance here.

  1. Open the resource group that contained the dropped server. In the activity log, you should see the activity of the resource being deleted. This contains the info you will need like sourceServerResourceId and DelegatedSubnetResourceId.
  2. Open the microsoft guide on restoring a dropped server.
  3. Click the green try it button under creates a new server

flexibleserver

  1. Sign into your account and select the tenant
  2. Enter the resourceGroupName, serverName, and select the subscriptionId. All this info will be in the json you grabbed earlier.

restAPI

  1. Under body, you will need to include a payload similar to:

    {
    "location": "uksouth",
    "properties":
    {
      "pointInTimeUTC": "20xx-xx-xxTxx:xx:xxZ",
      "createMode": "ReviveDropped",
      "sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup-Name/providers/Microsoft.DBforPostgreSQL/flexibleServers/SourceServer-Name",
    "Network": {
      "DelegatedSubnetResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup-Name/providers/Microsoft.Network/virtualNetworks/VirtualNetwork-Name/subnets/Subnet-Name",
      "PrivateDnsZoneArmResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup-Name/providers/Microsoft.Network/privateDnsZones/privatednszonename"
        }
    }
    }
    

    Note: You may need to select 10 minutes BEFORE the deletion point as pointInTimeUTC

  2. After hitting run you should see a 201 response. It is worth noting the servers can take several minutes to appear in the resource group, in some cases even after the activity log shows a failed job.

This page was last reviewed on 13 June 2026. It needs to be reviewed again on 13 June 2027 by the page owner platops-build-notices .
This page was set to be reviewed before 13 June 2027 by the page owner platops-build-notices. This might mean the content is out of date.