I have a Postgres 11 server (Single server) that does not show up in portal, but is still billed

Geir Sagberg 20 Reputation points
2025-12-12T17:48:55.7766667+00:00

I have a postgres server gaver11.postgres.database.azure.com that should probably have been migrated from Single to Flexible server earlier, but the web app still works and can connect to the server.

However, I can no longer see the server in the portal or via the CLI, so therefore I can no longer migrate it to a Flexible server.

I am still billed for it.

How can I migrate the server?

Azure Database for PostgreSQL
{count} votes

Answer accepted by question author
  1. Pilladi Padma Sai Manisha 995 Reputation points Microsoft External Staff Moderator
    2025-12-12T18:30:03.5433333+00:00

    Hi Geir Sagberg,
    Thankyou for Reaching Microsoft Q&A!
    Azure retired PostgreSQL Single Server in March 2025. If the resource wasn’t migrated, it can become “orphaned” still running and billed but invisible in Portal/CLI due to tenant or RBAC changes.

    What to do:

    Find the resource:

    In Portal: Switch Directory to the tenant linked to your billing profile.

    CLI:

    az account list --output table
    az account set --subscription <subscription-id>
    

    Use Resource Graph:

    az graph query -q "resources | where name contains 'gaver11'"
    

    Restore access:

    Add yourself back as Owner/Contributor at subscription level if RBAC was removed.

    Migrate to Flexible Server:

    -Create a new Flexible Server

    az postgres flexible-server create --resource-group <rg> --name <flex-name> --location <region>
    

    -Start migration

    az postgres flexible-server migration create --resource-group <rg> --migration-name <id> --properties @migration.json
    

    If migration isn’t possible:

    -Dump data

    pg_dump -h gaver11.postgres.database.azure.com -U <user> -d <db> -f db.dump
    pg_dumpall --roles-only > roles.sql
    

    -Restore to Flexible Server

    pg_restore -h <flex-name>.postgres.database.azure.com -U <user> -d <db> db.dump
    psql -h <flex-name>.postgres.database.azure.com -U <user> -f roles.sql
    

    Stop billing:

    Delete the old Single Server after migration or dispute charges via Cost Management.

    The empty Resource Graph results mean the old Single Server is fully retired post-March 2025: no control-plane resource left for portal/CLI deletion, just a lingering backend that'll auto-cleanup in -30 days with billing stopping.

    You've done everything possible on your end. Charges should drop off soon in Cost Management monitor there. Your Flexible Server is good to go!

    If this helps please do click Accept Answer and Upvote for was this answer helpful.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Geir Sagberg 20 Reputation points
    2025-12-12T23:39:41.2366667+00:00

    I set the subscription, but could not find any resources:

    geir@Azure:~$ az graph query -q "resources | where name contains 'gaver11'"

    {

    "count": 0,

    "data": [],

    "skip_token": null,

    "total_records": 0

    }

    However, the pg_dump worked and I was able to restore to a new flexible database.

    I still am not able to delete the old database, however. I will try to create a support ticket to have it deleted.


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.