Sync-VBRNASBackupState

Short Description

Rolls back file share backups stored on an immutable short-term repository to a point in time state.

Applies to

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides parameter sets that allow you to:

  • Roll back to a point in time file share backups created by a specific NAS backup job.

Sync-VBRNASBackupState -Job <VBRNASBackupJob> -PointInTime <DateTime> [-AllowDetach] [-Force] [-RunAsync] [<CommonParameters>]

  • Roll back to a point in time file share backups stored in specific immutable backup repository.

Sync-VBRNASBackupState -Repository <CBackupRepository> -PointInTime <DateTime> [-AllowDetach] [-Force] [-RunAsync] [<CommonParameters>]

  • Roll back to a point in time a certain file share backup.

Sync-VBRNASBackupState -Backup <VBRNASBackup> -PointInTime <DateTime> [-AllowDetach] [-Force] [-RunAsync] [<CommonParameters>]

Detailed Description

This cmdlet rolls back file share backups stored on an immutable short-term repository to a point in time state.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Job

Specifies the file share backup job. The cmdlet will roll back file share backups created with this job to a point in time.

Accepts the VBRNASBackupJob object. To create this object, run the Get-VBRNASBackupJob cmdlet.

True

Named

False

Repository

Specifies the backup repository. The cmdlet will roll back file share backups stored in this immutable backup repository to a point in time.

Accepts the CBackupRepository object. To get this object, run the Get-VBRBackupRepository cmdlet.

True

Named

True (ByPropertyName, ByValue)

Backup

Specifies the file share backup. The cmdlet will roll back this backup to a point in time.

Accepts the VBRNASBackup object. To get this object, run the Get-VBRNASBackup cmdlet.

True

Named

False

PointInTime

Specifies the point in time. The cmdlet will select the restore point that is the closest to the selected point in time.

For example, if you specify Thursday, October 25, 2018 3:25:45 PM as the point in time, the cmdlet will select the closest restore point to this point in time.

Note: The date format depends on the date format of the OS where you run the script.

Accepts the DateTime object. To get this object, run the Get-Date cmdlet.

True

Named

False

AllowDetach

Defines that if the backup has restore points archived in the long-term repository or backup copies that cannot be rolled back, these restore points will be detached from the backup.

SwitchParameter

False

Named

False

Force

Defines that the cmdlet will roll backups without showing warnings in the PowerShell console.

SwitchParameter

False

Named

False

RunAsync

Defines that the command returns immediately without waiting for the task to complete.

SwitchParamter

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Output Object

None.

Examples

Sync-VBRNASBackupState)Example 1. Rolling Back File Share Backups Created by Certain Job

This example shows how to roll back file share backups to a point in time. The file share backups created by the SMB Backup file backup jobs.

$fileJob = Get-VBRNASBackupJob -Name "SMB Backup"

$time = Get-Date-Year 2020 -Month 2 -Day 2 -Hour 0 -Minute 0 -Second 0

Sync-VBRNASBackupState -Job $fileJob -PointInTime $time

Perform the following steps:

  1. Run the Get-VBRNASBackupJob cmdlet. Specify the Name parameter value. Save the result to the $fileJob variable.
  2. Run the Get-Date cmdlet. Specify the Year, Month, Day, Hour, Minute and Second parameter values. Save the result to the $time variable.
  3. Run the Sync-VBRNASBackupState cmdlet. Set the $fileJob variable as the Job parameter value. Set the $time variable as the PointInTime parameter value.

Sync-VBRNASBackupState)Example 2. Rolling Back File Share Backups Stored in Certain Immutable Backup Repository

This example shows how to roll back file share backups to a point in time. The file share backups stored in the Repository 01 immutable backup repository.

$repository = Get-VBRBackupRepository -Name "Repository 01"

$time = Get-Date-Year 2020 -Month 2 -Day 2 -Hour 0 -Minute 0 -Second 0

Sync-VBRNASBackupState -PointInTime $time -Repository $time

Perform the following steps:

  1. Run the Get-VBRBackupRepository cmdlet. Specify the Name parameter value. Save the result to the $repository variable.
  2. Run the Get-Date cmdlet. Specify the Year, Month, Day, Hour, Minute and Second parameter values. Save the result to the $time variable.
  3. Run the Sync-VBRNASBackupState cmdlet. Set the $time variable as the PointInTime parameter value. Set the $repository variable as the Repository parameter value.

Sync-VBRNASBackupState)Example 3. Rolling Back Certain File Share Backups to Point in Time

This example shows how to roll back the Reports backup file share backup to a point in time.

$backup = Get-VBRNASBackup -Name "Reports backup"

$time = Get-Date-Year 2020 -Month 2 -Day 2 -Hour 0 -Minute 0 -Second 0

Sync-VBRNASBackupState -Backup $backup -PointInTime $time

Perform the following steps:

  1. Run the Get-VBRNASBackup cmdlet. Specify the Name parameter value. Save the result to the $fileJob variable.
  2. Run the Get-Date cmdlet. Specify the Year, Month, Day, Hour, Minute and Second parameter values. Save the result to the $time variable.
  3. Run the Sync-VBRNASBackupState cmdlet. Set the $backup variable as the Backup parameter value. Set the $time variable as the PointInTime parameter value.

Related Commands