你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzRecoveryServicesBackupRecoveryLogChain
此命令列出给定备份项的未中断日志链的起点和终点。 使用它来确定用户希望还原数据库的时间点是否有效。
语法
Get-AzRecoveryServicesBackupRecoveryLogChain
[-Item] <ItemBase>
[-UseSecondaryRegion]
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzRecoveryServicesBackupRecoveryLogChain
[[-StartDate] <DateTime>]
[[-EndDate] <DateTime>]
[-Item] <ItemBase>
[-UseSecondaryRegion]
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzRecoveryServicesBackupRecoveryLogChain cmdlet 获取备份的 Azure 备份项的时间范围恢复点。 备份项后,AzRecoveryServicesBackupRecoveryLogChain 对象具有一个或多个恢复时间范围。
示例
示例 1
$StartDate = (Get-Date).AddDays(-7)
$EndDate = Get-Date
$Container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureWorkload
$RP = Get-AzRecoveryServicesBackupItem -Container $Container -WorkloadType MSSQL | Get-AzRecoveryServicesBackupRecoveryLogChain -StartDate $Startdate.ToUniversalTime() -EndDate $Enddate.ToUniversalTime()
第一个命令从七天前获取日期,然后将其存储在$StartDate变量中。 第二个命令获取今天的日期,然后将其存储在$EndDate变量中。 第三个命令获取 AzureWorkload 备份容器,并将其存储在$Container变量中。 第四个命令获取备份项,然后将它作为备份项对象跨管道 cmdlet 共享。 最后一个命令获取$BackupItem项的恢复点时间范围数组,然后将其存储在$RP变量中。
示例 2
此命令列出给定备份项的未中断日志链的起点和终点。 (自动生成)
Get-AzRecoveryServicesBackupRecoveryLogChain -Item $Item -VaultId $vault.ID
参数
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-EndDate
需要提取恢复点的时间范围的结束时间
类型: | Nullable<T>[DateTime] |
Position: | 1 |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Item
需要为其提取恢复点的受保护项对象
类型: | ItemBase |
Position: | 2 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-StartDate
需要提取恢复点的时间范围的开始时间
类型: | Nullable<T>[DateTime] |
Position: | 0 |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-UseSecondaryRegion
从次要区域筛选跨区域还原
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-VaultId
恢复服务保管库的 ARM ID。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
输入
System.String