New-AzPostgreSqlReplica
從現有的資料庫建立新的複本。
語法
New-AzPostgreSqlReplica
-ReplicaName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-Master <IServer>
[-Location <String>]
[-Sku <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
從現有的資料庫建立新的複本。
範例
範例 1:建立新的 PostgreSql 伺服器複本
Get-AzPostgreSqlServer -ResourceGroupName PostgreSqlTestRG -ServerName PostgreSqlTestServer | New-AzPostgreSqlReplica -ReplicaName PostgreSqlTestServerReplica -ResourceGroupName PostgreSqlTestRG
Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier SslEnforcement
---- -------- ------------------ ------- ----------------------- ------- ------- --------------
postgresqltestserverreplica eastus pwsh 9.6 5120 GP_Gen5_4 GeneralPurpose Enabled
此 Cmdlet 會建立新的 PostgreSql 伺服器複本。
範例 2:建立新的 PostgreSql 伺服器複本
$pgDb = Get-AzPostgreSqlServer -ResourceGroupName PostgreSqlTestRG -ServerName PostgreSqlTestServer
New-AzPostgreSqlReplica -Master $pgDb -ReplicaName PostgreSqlTestServerReplica -ResourceGroupName PostgreSqlTestRG
Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier SslEnforcement
---- -------- ------------------ ------- ----------------------- ------- ------- --------------
postgresqltestserverreplica eastus pwsh 9.6 5120 GP_Gen5_4 GeneralPurpose Enabled
此 Cmdlet 會建立新的 PostgreSql 伺服器複本。
參數
-AsJob
以作業身分執行命令。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | PSObject |
別名: | AzureRMContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Location
資源所在的位置。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Master
要從中建立複本的來源伺服器物件。 若要建構,請參閱 MASTER 屬性的 NOTES 一節,並建立哈希表。
類型: | IServer |
別名: | InputObject |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-NoWait
以異步方式執行命令。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ReplicaName
伺服器的名稱。
類型: | String |
別名: | ReplicaServerName, Name |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
包含資源的資源群組名稱,您可以從 Azure Resource Manager API 或入口網站取得此值。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Sku
sku 的名稱,通常是階層 + 系列 + 核心,例如B_Gen4_1,GP_Gen5_8。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionId
識別 Azure 訂用帳戶的訂用帳戶標識碼。
類型: | String |
Position: | Named |
預設值: | (Get-AzContext).Subscription.Id |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |