简体   繁体   中英

Azure Powershell - rename Database for PostgreSQL Server instance

We have a Database for PostgreSql Server resource in Azure, with Locally redundant backup option set for Point in Time restoration as needed.

When restoring - a new server name is specified as part of the process.
Is there a way to rename the Server Name using Azure Powershell, post restore?

If not - is there any other known method to achieve that?

(the reason for asking is to test Disaster Recovery options, without losing original Server Resource, whilst maintaining the same server name)

You cannot rename Database for PostgreSQL Server instance.

But you can rename Azure SQL database through powershell by using the following command.

Ex:

Set-AzSqlDatabase -ResourceGroupName "GroupAzure" -ServerName 'mysql1000' -DatabaseName 'DemoDB' -NewName 'DemoDatabase'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM