Failure of Restoring (Point-in-time) an Azure PostgreSQL DB Server

Tim Jin 36 Reputation points
2020-12-10T19:15:31.827+00:00

I get 2 Azure PostgreSQL DB servers: "DBServerA" and "DBServerB" under subscription "MySubscription" and resource group "MyResourceGroup".

I have following script:

az account set --subscription MySubscription
az configure --defaults group=MyResourceGroup
az postgres server delete --name DBServerA --yes
az postgres server restore --name DBServerA --restore-point-in-time AValidTimeStamp --source-server DBServerB

Please note that AValidTimeStamp = current UTC time - 1 minute

Occasionally, error "*Deployment failed. Correlation ID: XXXX The Resource 'Microsoft.DBForPostgreSQL/servers/DBServerA' under resource group 'MyRessourceGroup' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix*" is reported when running "az postgres server restore"

Since all jobs are done within Azure CLI and there is few code I write myself, I wonder if there is something wrong in "az postgres server restore"?

Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,566 Reputation points
    2020-12-11T09:20:30.137+00:00

    Hi @Tim Jin , welcome to Microsoft Q&A forum. Apologies for the trouble you are facing.

    The commands provided by you worked perfectly fine when I tried. I created 2 azure PostgreSQL databases, then deleted one and restored new one with same name from other databases. Both are from same resource group.

    it does not look a problem with "az postgres server restore" command.

    As you mentioned this is occasional error, so I would suggest to retry the commands again and if you observe similar issue I can check with the internal team to look onto your subscription. Also I would suggest if you run the delete and restore commands with a little gap in time say 2-5 minutes to check if this issue is encountered then.

    Please let me know.

    0 comments No comments