I am using PostgreSQL server service on azure platform accidentally i have replaced my PostgreSQL server and all the data has been lost. The server has been recreated but the data is lost and the backups have been done from the date of new creation.

mungi sai meghavardhan 0 Reputation points
2024-05-18T13:02:25.1166667+00:00

I am using PostgreSQL server service which is handled by terraform. Recently I have recreated the server and the databases inside it accidentally while making a few changes to the code. The server has been recreated but the data is lost. The backup is available from the date of newly created server. Is there any way i can retrieve my data.

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

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2024-05-18T13:02:25.1366667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Yes, you can retrieve your data by performing a point-in-time-restore to create a copy of your server to a known good point in time. This point in time must be within the backup retention period you have configured for your server. After the data is restored to the new server, you can either replace the original server with the newly restored server or copy the needed data from the restored server into the original server. If you accidentally deleted your server, you might be able to restore it if the deletion happened within the last 5 days. For more information on how to restore a dropped Azure Database for PostgreSQL server, see the "Restore a dropped Azure Database for PostgreSQL server" article.


    References:

    0 comments No comments

  2. GeethaThatipatri-MSFT 28,377 Reputation points Microsoft Employee
    2024-05-29T19:55:10.7566667+00:00

    @mungi sai meghavardhan I'm sorry to hear about the situation with your PostgreSQL server.
    Please let me know if your issue resolved? so we can guide you further on this.
    To retrieve your lost data, you can perform a point-in-time restore to create a copy of your server to a known good point in time within the backup retention period you have configured for your server.

    https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-backup-restore

    https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/postgresql/flexible-server/how-to-restore-server-portal.md

    Regards

    Geetha

    0 comments No comments