Hi,@subhash-DBA Welcome to Microsoft Q&A thanks for posting your question.
If I understand correctly you want to know how to use pg_dump
or pg_dumpall
to backup certain tables in Azure Postgresql Flexi database to a storage within Azure (Azure storage / Azure files) for rollback purposes during application upgrades/changes.
you need to mount the Azure file share onto the VM where you have psql/pg_dump client library installed, you can follow the below steps.
Create an Azure Storage account or Azure Files share to store the backup files.
- Install
pg_dump
orpg_dumpall
on your local machine or a virtual machine in Azure. - Use
pg_dump
orpg_dumpall
to backup the required tables from the Azure Postgresql Flexi database to a file. - Upload the backup file to the Azure Storage account or Azure Files share created in step1 Please let me know if you find any issues or need any other information. https://www.postgresql.org/docs/current/app-pg-dumpall.html https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-create-file-share?tabs=azure-portal
Regards
Geetha