Django, Azure Web Service | What is the best way to backup and restore my data stored in Postgres Flexi Server

Md Shervin 0 Reputation points
2024-02-19T01:09:33.76+00:00

I have recently deployed my django applciation in azure app services together with a postgres flexi database server. I would like to know what is the best way to back up and restore my database, is there any best method or best practice that I can adopt, I am open to any option (Especially if anyone has built with a similar framework of mine over here). Thank you for your assistance!

Azure Database for PostgreSQL
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,962 questions
{count} votes

2 answers

Sort by: Most helpful
  1. ShaktiSingh-MSFT 13,751 Reputation points Microsoft Employee
    2024-02-19T05:39:43.6433333+00:00

    Hi Md Shervin •,

    Welcome to Microsoft Q&A forum.

    As I understand, you want to know ways to perform Backup and Restore in Azure Database for PostgreSQL Flexible Server.

    By default, Azure Database for PostgreSQL flexible server enables automated backups of your entire server (encompassing all databases created) with a default retention period of 7 days. The automated backups include a daily incremental snapshot of the database. The log (WAL) files are archived to Azure Blob Storage continuously.

    You can manually take a backup by using the PostgreSQL tool pg_dump. For examples, see Migrate your Azure Database for PostgreSQL flexible server database by using dump and restore.

    If you want to back up Azure Database for PostgreSQL flexible server to Blob Storage, see Back up Azure Database for PostgreSQL to Blob Storage on our tech community blog. Restoring a single database or a few databases or tables is not directly supported. However, you can restore the entire server to a new server, and then extract tables or databases and import them to the new server.

    For more details refer to https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-backup-restore

    Let us know if this helped or you have more queries.

    Thanks

    0 comments No comments

  2. Sreeju Nair 11,621 Reputation points
    2024-02-19T05:42:59.6733333+00:00

    There is a detailed article about the backup / restore for PostgreSQL flexible server. You may find the article here. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-backup-restore Hope this helps

    0 comments No comments