No backups generated for Azure Flexible Server for PostgresSQL

Roman Kastusik 0 Reputation points
2025-02-17T10:07:09.38+00:00

I have a Felxible Server for Postgresql that I have restored from a backup of another server. I now use this new server for its own purpose, but there are no backups available when I go to 'Backup & Restore' blade. The retention is set for 7 days. Backup storage used metric is flat at 1.6 GB.

Is there a setting I need to turn on to activate the backups?

Azure Database for PostgreSQL
Backup
Backup
A duplicate copy of a program, a disk, or data, made either for archiving purposes or for safeguarding valuable files from loss should the active copy be damaged or destroyed.
10 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 18,126 Reputation points
    2025-02-17T17:17:38.98+00:00

    Hello Roman Kastusik,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you could not find backups generated for Azure Flexible Server for PostgreSQL.

    The most likely cause is that the backup scheduling did not properly initialize after the server was restored. Restarting the server and checking retention settings should resolve the issue. If not, contacting Microsoft Support is necessary as this may be a bug in Azure PostgreSQL Flexible Server’s backup handling.

    What you will need to do before contacting Microsoft:

    Step 1: Run the following Azure CLI command to check if backups exist:

    az postgres flexible server backup list   resource group <ResourceGroupName>   server name <ServerName>
    

    If no backups appear, proceed to the next steps.

    Step 2: Since the restoration might not have triggered backup scheduling, restarting the server can force it to reinitialize backup operations:

    az postgres flexible server restart   name <ServerName>   resource group <ResourceGroupName>
    

    Wait at least 24 hours after the restart and check again.

    Step 3: Check if the retention setting is correctly applied:

    az postgres flexible server show   name <ServerName>   resource group <ResourceGroupName>   query "backupRetentionDays"
    

    If it is set to null or 0, backups will not be taken. You can manually set it to 7 days:

    az postgres flexible server update   name <ServerName>   resource group <ResourceGroupName>   backup retention 7
    

    Step 4: If automated backups are failing, force an on-demand backup:

    az postgres flexible server backup create   resource group <ResourceGroupName>   server name <ServerName>
    

    If this fails, there may be an issue with the backup service recognizing the restored server .

    Step 5: If steps above don’t work or if backups still do not appear, this could be a platform level issue where the backup service is not recognizing the restored server as eligible for backups. You will need to escalate this to Microsoft Support via Azure Portal > Help + Support > Create a support request.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.