Lesson Learned #111: Running the Web App backup service for Azure Database for PostgreSQL
Published Nov 15 2019 10:12 AM 1,171 Views

1) The connection string format:


  • When you define the connection string in the WebApp connection string to use by the backup service, please, use this string Database=DatabaseName;Server=servername.postgres.database.azure.com; User Id=jmjurado@servername; Password=Password123!


2) Why when I changed the connection string Web App service backup is using the previous connection string:


  • I found that even when I changed the connection string, Web App Service backup is using the previous one. All points to Web App Service backup saves the connection string in another place and will use this always, even if you performend any change. So, my suggesion is to reset the backup configuration, apply the modifications in the connection string and configure it again. Web App Service backup will use the latest one. 


3) In the connection string, the database name is sensitive case:


  • For this reason, use lower and upper depending on the name of the database. 


4) I have found that when the version of Azure Database for PostgreSQL is 11, you are going to have the following error message: "PostgreSQL backup exited with code 1 for db:postgres. Exception:pg_dump: aborting because of server version mismatch."


  • This points to that the version of pg_dump that Web App Backup Services is using is not compatible nowadays with the version 11 of Azure Database for PostgreSQL. Others previous versions like 9.6 works correctly with Web App Backup Services. 


My suggestion in this type of situation is to use the inbuilt backup service that Azure Database for PostgreSQL because besides that is compatible with all versions, is performing transactional backups every 5-10 minutes and it is possible to restore a instance at any point in time within the retention period. 



Version history
Last update:
‎Nov 09 2023 11:09 AM
Updated by: