Get-VEHANARestoreJob

Short Description

Returns active SAP HANA restore jobs.

Applies to

Veeam Backup & Replication

Product Edition: Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides parameter sets that allow you to:

  • Return an active restore job using the job ID.

Get-VEHANARestoreJob -JobId <Guid> [<CommonParameters>]

  • Return an active restore job using the name of the restored database.

Get-VEHANARestoreJob [-DatabaseName <String>] [<CommonParameters>]

Detailed Description

This cmdlet returns an array of ongoing SAP HANA restore jobs. After you specify the restore job you need, you can use the Get-VEHANARestoreJobActionLogItems cmdlet to get an overview of the restore process. You can also stop the restore process with the Stop-VEHANARestoreJob cmdlet or restart a failed restore job using the Restart-VEHANADatabaseRestore cmdlet.

Note the difference between a restore session and a restore job. A restore session is a preliminary step where Veeam Explorer for SAP HANA has retrieved the backup from the backup repository, pending restore operations. A restore job is the process of restoring data from the backup to the target SAP HANA system.

Get-VEHANARestoreJob Note:

The cmdlet returns restore jobs initiated in the PowerShell console only. The cmdlet does not return restore jobs running in the Veeam Backup & Replication console.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

DatabaseName

Specifies the name of a restored SAP HANA database. The cmdlet will return information about the restore process performed for the specified database.

String

False

Named

False

JobId

Specifies the job ID of the required restore job. The cmdlet will return information about the restore process performed for the specified database.

Guid

True

Named

True (ByValue)

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Output Object

The cmdlet returns the VEHANARestore[] object that contains information about ongoing SAP HANA restore jobs.

Examples

Get-VEHANARestoreJobExample 1. Getting All Active Restore Jobs

This command gets all running restore jobs. Save the result to the $restore variable to be able to use it with other cmdlets.

$restore = Get-VEHANARestoreJob

Get-VEHANARestoreJobExample 2. Getting Restore Job by Job ID

This example shows how to get a specific restore by its job ID.

$restore = Get-VEHANARestoreJob

$restore = Get-VEHANARestoreJob -JobId $restore.Id[0]

Perform the following steps:

  1. Run the Get-VEHANARestoreJob cmdlet. Save the result to the $restore variable.

The cmdlet will return an array of active restore jobs. Note the ordinal number of the necessary restore job. In our example, it is the first restore job in the array.

  1. Run the Get-VEHANARestoreJob cmdlet. Set a subset of the $restore variable, containing the first value in the Id column, as the JobId parameter value. Save the result to the $restore variable to be able to use it with other cmdlets.

Get-VEHANARestoreJobExample 3. Getting Restore Job by Database Name

This example shows how to get a specific restore session to perform operations with SAP HANA databases.

$restore = Get-VEHANARestoreJob

$restore = Get-VEHANARestoreJob -DatabaseName $restore.Database[0]

Perform the following steps:

  1. Run the Get-VEHANARestoreJob cmdlet. Save the result to the $restore variable.

The cmdlet will return an array of active restore jobs. Note the ordinal number of the necessary restore job. In our example, it is the first restore job in the array.

  1. Run the Get-VEHANARestoreJob cmdlet. Set a subset of the $restore variable, containing the first value in the Database column, as the DatabaseName parameter value. Save the result to the $restore variable to be able to use it with other cmdlets.

Related Commands