0

We are trying to devise a backup strategy for Azure Flexible Server. Can we use the native pgdumpall as a backup and restore mechanism, I am able to take a dumpall by excluding azure default database (as we are not super user in managed server)

pg_dumpall - Azure Database for PostgreSQL - permission denied for database "azure_maintenance"

Can we restore the dump that we create somehow in the managed postgres flexible server, I am unable to find any support in this regard.

1 Answers1

1

You should be able to restore the dump to Flexible server. See if any of these docs help however for the link you shared Yes, we do not allow dump all as some of the internal DBs are not exposed to customers due to security.

Upgrade using dump and restore - Azure Database for PostgreSQL | Microsoft Docs Dump and restore - Azure Database for PostgreSQL - Single Server | Microsoft Docs

  • Thank you, so I can restore a dump spanning multiple databases? as. per documentation we need to specify the target database, so I am confused how it will work for dump containing multiple databases. – Usman Khawar Jun 19 '22 at 19:20
  • The preferred mode is to perform dump for each database. It is straightforward and clean to do pg_restore. When using dump all, then it has to be edited before restoring check this document (https://nicolaiarocci.com/how-to-restore-a-single-postgres-database-from-a-pg_dumpall-dump/) however, I haven't tried dump all and restore individual DB files or use dumpall and restore all but for now, perhaps you can do an individual dump and restore. – GeethaThatipatri-MSFT Jun 21 '22 at 01:14
  • @GeethaThatipatri-MSFT how do you dump roles? zero documentation about this – holms Oct 11 '22 at 06:27
  • about restoring the roles using pg_dumpall --roles-only Check here https://learn.microsoft.com/en-us/azure/postgresql/single-server/how-to-upgrade-using-dump-and-restore – GeethaThatipatri-MSFT Oct 17 '22 at 18:13