Azure Database for PostgreSQL Flexible Server yearly backup

veerabose chandran 260 Reputation points
2023-08-12T04:05:12.3166667+00:00

Hi Experts,

Good day all.

We require to take a yearly backup of the Azure Database for PostgreSQL Flexible Server, but PostgreSQL Flexible Server only backups for 35 days. If we have to use pg_dump to backup PostgreSQL Flexible Server, how can we automate it and save the backup file in the storage account file share?

Could you please assist me.

Thanks

Veera.

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

Accepted answer
  1. GeethaThatipatri-MSFT 29,552 Reputation points Microsoft Employee Moderator
    2023-08-14T15:34:25.75+00:00

    Hi @Anonymous Thanks for posting your question in Microsoft Q&A

    I understand you want to know how to automate the backup process and save the backup file in the storage account file share.

    You need to automate the move from cloud drive to Blog storage using Azure functions or scripts, to create a timer-triggered function that runs the pg_dump command at a specified interval. You can then save the backup file to an Azure Storage account file share using the Azure Storage SDK for Python.

    On the backup you follow this blog https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/backup-azure-database-for-postgresql-to-a-blob-storage/ba-p/803343

    you can also refer to this forum https://stackoverflow.com/questions/68950554/how-to-use-az-cli-or-bash-inside-azure-function-app/68983039#68983039

    Regards

    Geetha

    1 person found this answer helpful.

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.