Get-AzRecoveryServicesBackupRecoveryLogChain

This command lists the start and end points of the unbroken log chain of the given backup item. Use it to determine whether the point-in-time, to which the user wants the DB to be restored, is valid or not.

Syntax

Get-AzRecoveryServicesBackupRecoveryLogChain
   [-Item] <ItemBase>
   [-VaultId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRecoveryServicesBackupRecoveryLogChain
   [[-StartDate] <DateTime>]
   [[-EndDate] <DateTime>]
   [-Item] <ItemBase>
   [-VaultId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzRecoveryServicesBackupRecoveryLogChain cmdlet gets the time range recovery points in time for a backed up Azure Backup item. After an item has been backed up, an AzRecoveryServicesBackupRecoveryLogChain object has one or more recovery time ranges.

Examples

Example 1

PS C:\> $StartDate = (Get-Date).AddDays(-7) 
PS C:\> $EndDate = Get-Date 
PS C:\> $Container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureWorkload -Status Registered
PS C:\> $RP = Get-AzRecoveryServicesBackupItem -Container $Container -WorkloadType MSSQL | Get-AzRecoveryServicesBackupRecoveryLogChain -StartDate $Startdate.ToUniversalTime() -EndDate $Enddate.ToUniversalTime()

The first command gets the date from seven days ago, and then stores it in the $StartDate variable. The second command gets today's date, and then stores it in the $EndDate variable. The third command gets AzureWorkload backup containers, and stores them in the $Containers variable. The fourth command gets the backup item, and then stores it in the $BackupItem variable. The last command gets an array of recovery point time ranges for the item in $BackupItem, and then stores them in the $RP variable.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EndDate

End time of Time range for which recovery point need to be fetched

Type:System.Nullable`1[System.DateTime]
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Item

Protected Item object for which recovery point need to be fetched

Type:Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ItemBase
Position:2
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-StartDate

Start time of Time range for which recovery point need to be fetched

Type:System.Nullable`1[System.DateTime]
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VaultId

ARM ID of the Recovery Services Vault.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Inputs

Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ItemBase

System.String

Outputs

Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.RecoveryPointBase

Notes