你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzRecoveryServicesBackupRecoveryLogChain

此命令列出给定备份项的未中断日志链的起点和终点。 使用它来确定用户希望还原数据库的时间点是否有效。

语法

NoFilterParameterSet (默认值)

Get-AzRecoveryServicesBackupRecoveryLogChain
    [-Item] <ItemBase>
    [-UseSecondaryRegion]
    [-VaultId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

DateTimeFilter

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

此命令列出给定备份项的未中断日志链的起点和终点。 (autogenerated)

Get-AzRecoveryServicesBackupRecoveryLogChain -Item $Item -VaultId $vault.ID

参数

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

参数属性

类型:IAzureContextContainer
默认值:None
支持通配符:False
不显示:False
别名:AzContext, AzureRmContext, AzureCredential

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-EndDate

需要提取恢复点的时间范围的结束时间

参数属性

类型:

Nullable<T>[DateTime]

默认值:None
支持通配符:False
不显示:False

参数集

DateTimeFilter
Position:1
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Item

需要为其提取恢复点的受保护项对象

参数属性

类型:ItemBase
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:2
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-StartDate

需要提取恢复点的时间范围的开始时间

参数属性

类型:

Nullable<T>[DateTime]

默认值:None
支持通配符:False
不显示:False

参数集

DateTimeFilter
Position:0
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-UseSecondaryRegion

从次要区域筛选跨区域还原

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-VaultId

恢复服务保管库的 ARM ID。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

ItemBase

System.String

输出

RecoveryPointBase