Restore-AzPostgreSqlFlexibleServer
	
	
		使用异地还原还原 PostgreSQL 灵活服务器
	 
	语法
	
		PointInTimeRestore (默认值)
	
	
		Restore-AzPostgreSqlFlexibleServer
    -Name <String>
    -ResourceGroupName <String>
    -SourceServerName <String>
    -RestorePointInTime <DateTime>
    [-SubscriptionId <String>]
    [-Zone <String>]
    [-Subnet <String>]
    [-PrivateDnsZone <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
	 
	
		GeoRestore
	
	
		Restore-AzPostgreSqlFlexibleServer
    -Name <String>
    -ResourceGroupName <String>
    -SourceServerName <String>
    -RestorePointInTime <DateTime>
    [-SubscriptionId <String>]
    [-UseGeoRestore]
    [-Sku <String>]
    [-Tag <Hashtable>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
	 
	说明
	
		使用异地还原还原 PostgreSQL 灵活服务器
	 
	示例
	示例 1:使用 PointInTime 还原还原 PostgreSql 服务器
	
		$restorePointInTime = (Get-Date).AddMinutes(-10)
Restore-AzPostgreSqlFlexibleServer -Name pg-restore -ResourceGroupName PowershellPostgreSqlTest -SourceServerName postgresql-test -RestorePointInTime $restorePointInTime
Name           Location  SkuName         SkuTier        AdministratorLogin StorageSizeGb
----           --------  -------         -------        ------------------ -------------
pg-restore     East US   Standard_D2s_v3 GeneralPurpose daeunyim           128
这些 cmdlet 使用 PointInTime Restore 还原 PostgreSql 服务器。
	 
	示例 1:通过不同网络资源使用 PointInTime Restore 还原 PostgreSql 服务器
	
		$Subnet = '/subscriptions/00000000-0000-0000-0000-0000000000/resourceGroups/PowershellPostgreSqlTest/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/subnetname'
$DnsZone = '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/postgresqltest/providers/Microsoft.Network/privateDnsZones/testserver.private.postgres.database.azure.com'
$restorePointInTime = (Get-Date).AddMinutes(-10)
Restore-AzPostgreSqlFlexibleServer -Name pg-restore -ResourceGroupName PowershellPostgreSqlTest -SourceServerName postgresql-test -RestorePointInTime $restorePointInTime -Subnet $subnet -PrivateDnsZone $DnsZone
Name           Location  SkuName         SkuTier        AdministratorLogin StorageSizeGb
----           --------  -------         -------        ------------------ -------------
pg-restore     East US   Standard_D2s_v3 GeneralPurpose daeunyim           128
这些 cmdlet 使用 PointInTime Restore 还原 PostgreSql 服务器。
	 
	参数
		-AsJob
		以作业身份运行命令。
		参数属性
		
		参数集
			
				
					(All) 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-Confirm
		在运行 cmdlet 之前,提示你进行确认。
		参数属性
		
		参数集
			
				
					(All) 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-DefaultProfile
		用于与 Azure 通信的凭据、帐户、租户和订阅。
		参数属性
		
				| 类型: | PSObject
 | 
				| 默认值: | None | 
				| 支持通配符: | False | 
				| 不显示: | False | 
				| 别名: | AzureRMContext, AzureCredential | 
		
		参数集
			
				
					(All) 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-Name
		要还原的服务器的名称。
		参数属性
		
				| 类型: | String
 | 
				| 默认值: | None | 
				| 支持通配符: | False | 
				| 不显示: | False | 
				| 别名: | 服务器名称 | 
		
		参数集
			
				
					(All) 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | True | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-NoWait
		异步运行命令。
		参数属性
		
		参数集
			
				
					(All) 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-PrivateDnsZone
		现有专用 DNS 区域的 ID。
可以使用同一资源组、不同资源组或不同订阅中的专用 DNS 区域。
dns 区域的后缀必须与服务器的完全限定域的后缀相同。
		参数属性
		
				| 类型: | String
 | 
				| 默认值: | None | 
				| 支持通配符: | False | 
				| 不显示: | False | 
		
		参数集
			
				
					PointInTimeRestore 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-ResourceGroupName
		包含资源的资源组的名称。
		参数属性
		
				| 类型: | String
 | 
				| 默认值: | None | 
				| 支持通配符: | False | 
				| 不显示: | False | 
		
		参数集
			
				
					(All) 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | True | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-RestorePointInTime
		从 (ISO8601 格式)还原的时间点,例如 2017-04-26T02:10:00+08:00。
		参数属性
		
				| 类型: | DateTime
 | 
				| 默认值: | None | 
				| 支持通配符: | False | 
				| 不显示: | False | 
		
		参数集
			
				
					(All) 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | True | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-Sku
		sku 的名称,通常为层 + 系列 + 核心,例如B_Gen4_1,GP_Gen5_8。
		参数属性
		
				| 类型: | String
 | 
				| 默认值: | None | 
				| 支持通配符: | False | 
				| 不显示: | False | 
		
		参数集
			
				
					GeoRestore 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-SourceServerName
		要从中还原的源服务器的名称。
		参数属性
		
				| 类型: | String
 | 
				| 默认值: | None | 
				| 支持通配符: | False | 
				| 不显示: | False | 
		
		参数集
			
				
					(All) 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | True | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-Subnet
		专用访问服务器将创建到的现有子网的 ID。
请注意,子网将委托给 Microsoft.DBforPostgreSQL/flexibleServers。
委派后,此子网不能用于任何其他类型的 Azure 资源。
		参数属性
		
				| 类型: | String
 | 
				| 默认值: | None | 
				| 支持通配符: | False | 
				| 不显示: | False | 
		
		参数集
			
				
					PointInTimeRestore 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-SubscriptionId
		标识 Azure 订阅的订阅 ID。
		参数属性
		
				| 类型: | String
 | 
				| 默认值: | (Get-AzContext).Subscription.Id | 
				| 支持通配符: | False | 
				| 不显示: | False | 
		
		参数集
			
				
					(All) 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-Tag
		键值对形式的应用程序特定元数据。
		参数属性
		
		参数集
			
				
					GeoRestore 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-UseGeoRestore
		使用异地模式还原
		参数属性
		
		参数集
			
				
					GeoRestore 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | True | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-WhatIf
		显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
		参数属性
		
		参数集
			
				
					(All) 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		-Zone
		要在其中预配资源的可用性区域。
		参数属性
		
				| 类型: | String
 | 
				| 默认值: | None | 
				| 支持通配符: | False | 
				| 不显示: | False | 
		
		参数集
			
				
					PointInTimeRestore 
					
						
					
				
				
						| Position: | Named | 
						| 必需: | False | 
						| 来自管道的值: | False | 
						| 来自管道的值(按属性名称): | False | 
						| 来自剩余参数的值: | False | 
				
			 
		CommonParameters
		
			此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
		 
	输出