Query to find out when the last time a database backup was taken in PostgreSQL

2023-12-25T15:12:56.11+00:00

Looking for a query to find out when the last time a database backup was taken in Azure Database for PostgreSQL flexible server.

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

Accepted answer
  1. Azar 28,610 Reputation points MVP Moderator
    2023-12-25T15:22:53.5933333+00:00

    Hi Naveen Kumar Kakarla (Quadrant Resource)

    I think you can't query backup information in the same way as you might on a traditional SQL Server.

    but you can check the last backup time using the Azure CLI. ill guide you on how to check this using the CLI

    az postgres flexible-server show --resource-group YourResourceGroup --name YourPostgreSQLServer --query 'backupInfo.earliestRestoreDate'
    
    
    

    Thi command backupInfo.earliestRestoreDate property, which represents the timestamp of the last backup time.

    If this helps kindly accept the answer thanks much.

    0 comments No comments

0 additional answers

Sort by: Most 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.