Sync-VBRUnstructuredBackupState

Short Description

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

Note

This cmdlet is available starting from Veeam Backup & Replication 12.1 (build 12.1.0.2131).

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 and object storage backups created by a specific file backup job or object storage backup job.

Sync-VBRUnstructuredBackupState -Job <VBRUnstructuredBackupJob> -PointInTime <datetime> [-AllowDetach] [-Force] [-RunAsync]  [<CommonParameters>]

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

Sync-VBRUnstructuredBackupState -Repository <CBackupRepository> -PointInTime <datetime> [-AllowDetach] [-Force] [-RunAsync]  [<CommonParameters>]

  • Roll back to a point in time a certain file share backup and object storage backups.

Sync-VBRUnstructuredBackupState -Backup <VBRUnstructuredBackup> -PointInTime <datetime> [-AllowDetach] [-Force] [-RunAsync]  [<CommonParameters>]

Detailed Description

This cmdlet rolls back file share backups or object storage 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 backup job or object storage backup job. The cmdlet will roll back file share backups or object storage backups created with these jobs to a point in time.

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

True

Named

False

Repository

Specifies the backup repository. The cmdlet will roll back file share backups or object storage 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 or object storage backup. The cmdlet will roll back this backup to a point in time.

Accepts the VBRNASBackup object. To get this object, run the Get-VBRUnstructuredBackup 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-VBRUnstructuredBackupStateExample 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-VBRUnstructuredBackupJob -Name "SMB Backup"

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

Sync-VBRUnstructuredBackupState -Job $fileJob -PointInTime $time

Perform the following steps:

  1. Run the Get-VBRUnstructuredBackupJob 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-VBRUnstructuredBackupState cmdlet. Set the $fileJob variable as the Job parameter value. Set the $time variable as the PointInTime parameter value.

Sync-VBRUnstructuredBackupStateExample 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-VBRUnstructuredBackupState -Repository $repository -PointInTime $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-VBRUnstructuredBackupState cmdlet. Set the $repository variable as the Repository parameter value. Set the $time variable as the PointInTime parameter value.

Sync-VBRUnstructuredBackupStateExample 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-VBRUnstructuredBackup -Name "Reports backup"

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

Sync-VBRUnstructuredBackupState -Backup $backup -PointInTime $time

Perform the following steps:

  1. Run the Get-VBRUnstructuredBackup 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-VBRUnstructuredBackupState cmdlet. Set the $backup variable as the Backup parameter value. Set the $time variable as the PointInTime parameter value.

Related Commands