Restart an Azure Database for PostgreSQL - Flexible Server instance
APPLIES TO: Azure Database for PostgreSQL - Flexible Server
This article shows you how to perform restart, start and stop an Azure Database for PostgreSQL flexible server instance using Azure CLI.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
Install or upgrade Azure CLI to the latest version. See Install Azure CLI.
Login to Azure account using az login command. Note the id property, which refers to Subscription ID for your Azure account.
az login
If you have multiple subscriptions, choose the appropriate subscription in which you want to create the server using the
az account set
command. `az account set --subscription <subscription id>
Create an Azure Database for PostgreSQL flexible server instance if you haven't already created one using the
az postgres flexible-server create
command.az postgres flexible-server create --resource-group myresourcegroup --name myservername
Restart a server
To restart a server, run the az postgres flexible-server restart
command. If you're using local context, you don't need to provide any arguments.
Usage:
az postgres flexible-server restart [--name]
[--resource-group]
[--subscription]
Example without local context:
az postgres flexible-server restart --resource-group --name myservername
Example with local context:
az postgres flexible-server restart
Important
Once the server has restarted successfully, all management operations are now available for the Azure Database for PostgreSQL flexible server instance.