I try to upoad backup file to azure postrgesql server, but I got an error
psql:E:/PostgreSqlBackups/WeatherDb/weatherDb_11_08_2023.sql:26: ERROR: extension "postgis" is not allow-listed for "azure_pg_admin" users in Azure Database for PostgreSQL
In the server parameters I have : postgis.gdal_enabled_drivers ENABLE_ALL
How can I solve this?
When I tried to replicate the issue in my environment, I got the same error in my environment:
To solve the error, I followed below procedure:
Go to server parameter and search for azure extensions, select POSTGIS and save it as mentioned in below image:
After that I tried to upload backup file into PostgreSQL database using below command:
psql -h <serverName>.postgres.database.azure.com -U <serverAdminLoginName> -d <dbName> -f <backupfile path>
The file is restored to the PostgreSQL database successfully: