Start-VEHANADatabaseRestore
Short Description
Restores a backed-up SAP HANA database.
Product: Veeam Backup & Replication
Product Edition: Enterprise Plus, Veeam Universal License
Syntax
This cmdlet provides the following parameter sets:
-
RestoreToAnotherServerPointInTime
|
Start-VEHANADatabaseRestore -TargetServerName <String> -TargetSystemName <String>
[-TargetDatabaseName <String>] [-Database] <VEHANADatabase> -PointInTime <DateTime> -TimeZone <TimeZoneInfo>
[-TargetSystemUserPassword <SecureString>] [-GuestCredential <PSCredential>]
[-ApplicationCredential <PSCredential>] [-UseHttps] [-UseSSL] [-ClientCertificatePath <String>]
[-ClientCertificatePassword <SecureString>] [-Force] [<CommonParameters>] |
-
RestoreToAnotherServerSpecificBackup
|
Start-VEHANADatabaseRestore -TargetServerName <String> -TargetSystemName <String>
[-TargetDatabaseName <String>] [-Backup] <VEHANABackupCatalogItem> [-TargetSystemUserPassword <SecureString>]
[-GuestCredential <PSCredential>] [-ApplicationCredential <PSCredential>] [-UseHttps] [-UseSSL]
[-ClientCertificatePath <String>] [-ClientCertificatePassword <SecureString>] [-Force] [<CommonParameters>] |
-
RestoreToAnotherServerByPrefix
|
Start-VEHANADatabaseRestore -TargetServerName <String> -TargetSystemName <String>
[-TargetDatabaseName <String>] [-Database] <VEHANADatabase> -Prefix <String>
[-TargetSystemUserPassword <SecureString>] [-GuestCredential <PSCredential>]
[-ApplicationCredential <PSCredential>] [-UseHttps] [-UseSSL] [-ClientCertificatePath <String>]
[-ClientCertificatePassword <SecureString>] [-Force] [<CommonParameters>] |
-
RestoreToOriginalLatestState
|
Start-VEHANADatabaseRestore [-Database] <VEHANADatabase> [-TargetSystemUserPassword <SecureString>]
[-GuestCredential <PSCredential>] [-ApplicationCredential <PSCredential>] [-UseHttps] [-UseSSL]
[-ClientCertificatePath <String>] [-ClientCertificatePassword <SecureString>] [-Force] [<CommonParameters>] |
-
RestoreToOriginalPointInTime
|
Start-VEHANADatabaseRestore [-Database] <VEHANADatabase> -PointInTime <DateTime> -TimeZone <TimeZoneInfo>
[-TargetSystemUserPassword <SecureString>] [-GuestCredential <PSCredential>]
[-ApplicationCredential <PSCredential>] [-ClearLog] [-UseHttps] [-UseSSL] [-ClientCertificatePath <String>]
[-ClientCertificatePassword <SecureString>] [-Force] [<CommonParameters>] |
-
RestoreToOriginalByPrefix
|
Start-VEHANADatabaseRestore [-Database] <VEHANADatabase> -Prefix <String>
[-TargetSystemUserPassword <SecureString>] [-GuestCredential <PSCredential>]
[-ApplicationCredential <PSCredential>] [-UseHttps] [-UseSSL] [-ClientCertificatePath <String>]
[-ClientCertificatePassword <SecureString>] [-Force] [<CommonParameters>] |
-
RestoreToOriginalSpecificBackup
|
Start-VEHANADatabaseRestore [-Backup] <VEHANABackupCatalogItem> [-TargetSystemUserPassword <SecureString>]
[-GuestCredential <PSCredential>] [-ApplicationCredential <PSCredential>] [-UseHttps] [-UseSSL]
[-ClientCertificatePath <String>] [-ClientCertificatePassword <SecureString>] [-Force] [<CommonParameters>] |
Detailed Description
This cmdlet restores a backed-up SAP HANA database. After you start a restore job, you can use the Get-VEHANARestoreJobActionLogItemsReturns action log items for an SAP HANA restore job. cmdlet to get an overview of the restore process. You can also stop the restore process with the Stop-VEHANADatabaseRestoreStops the restore process for a backed-up SAP HANA database. cmdlet or restart a failed restore job using the Restart-VEHANADatabaseRestoreRestarts a failed restore job for an SAP HANA database. cmdlet.
Parameters
Parameters
|
Parameter
|
Description
|
Type
|
Required
|
Position
|
Accept Pipeline Input
|
|
ApplicationCredential
|
Specifies the credentials for the target SAP HANA system.
Note: This parameter is obligatory when the plug-in on the target machine is managed by a standalone Veeam Plug-in for SAP HANA.
Accepts the PSCredential object. To get this object, run the Get-Credential cmdlet.
|
PSCredential
|
False
|
Named
|
False
|
|
Backup
|
Specifies an SAP HANA backup from the backup catalog.
Accepts the VEHANABackupCatalogItem object. To get this object, run the Get-VEHANABackupCatalogItemReturns backup catalog items for a specific SAP HANA database. cmdlet.
|
VEHANABackupCatalogItem
|
True
|
0
|
True (ByValue)
|
|
ClearLog
|
Clears the log area and restores the database as of the last log backup before the selected point in time.
Note: To ensure stable operation of the database on the target system, this parameter is automatically used when restoring a tenant SAP HANA database to another server.
|
SwitchParameter
|
False
|
Named
|
False
|
|
ClientCertificatePassword
|
Specifies the password of the private key used for client validation.
A password is only required if the certificate was exported with password protection enabled.
|
SecureString
|
False
|
Named
|
False
|
|
ClientCertificatePath
|
Specifies the path of the private key used for client validation.
|
String
|
False
|
Named
|
False
|
|
Database
|
Specifies an SAP HANA database. The cmdlet will start a restore job for the specified database.
Accepts the VEHANADatabase object. To get this object, run the Get-VEHANADatabaseReturns backed-up SAP HANA databases. cmdlet.
|
VEHANADatabase
|
True
|
0
|
True (ByValue)
|
|
Force
|
Defines that the cmdlet will overwrite an existing SAP HANA database with an SAP HANA database from the backup.
Note: The cmdlet will show no prompt before executing the command.
|
SwitchParameter
|
False
|
Named
|
False
|
|
GuestCredential
|
Specifies the credentials for the target SAP HANA server.
Note: This parameter is obligatory when the plug-in on the target machine is managed by a standalone Veeam Plug-in for SAP HANA.
Accepts the PSCredential object. To get this object, run the Get-Credential cmdlet.
|
PSCredential
|
False
|
Named
|
False
|
|
PointInTime
|
Specifies a point in time in the backup file. The cmdlet will restore the database to the state of the specified point in time.
Note: You must specify the time zone of the selected point in time using the TimeZone parameter.
|
DateTime
|
True
|
Named
|
False
|
|
Prefix
|
Specifies the backup prefix of the SAP HANA backup you want to use.
|
String
|
True
|
Named
|
False
|
|
TargetDatabaseName
|
Specifies the name of the restored database on the target server.
|
String
|
False
|
Named
|
False
|
|
TargetServerName
|
Specifies DNS name or IP address of the target server.
|
String
|
True
|
Named
|
False
|
|
TargetSystemName
|
Specifies the name of the target system.
|
String
|
True
|
Named
|
False
|
|
TargetSystemUserPassword
|
Specifies the SYSTEM database user password for the newly created database on the target server.
Note: This parameter is only required if the restore process creates a new database on the target server.
|
SecureString
|
False
|
Named
|
False
|
|
TimeZone
|
Specifies the time zone of the point-in-time state to which you want to restore your data.
|
TimeZoneInfo
|
True
|
Named
|
False
|
|
UseHttps
|
Defines that Veeam Explorer for SAP HANA will use the HTTPS protocol for establishing a connection to the target SAP HANA server.
|
SwitchParameter
|
False
|
Named
|
False
|
|
UseSSL
|
Defines that Veeam Explorer for SAP HANA will use the TLS protocol to establish a secure connection to the target SAP HANA system.
|
SwitchParameter
|
False
|
Named
|
False
|
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Learn.
Output Object
The cmdlet returns the VEHANARestore object, that contains information about the status of the SAP HANA restore job.
Examples
Example 1. Restoring Latest State to Original Location
|
This example shows how to restore an SAP HANA database to the original location. Note that in this example, the plug-in on the SAP HANA machine is managed by a protection group in Veeam Backup & Replication, so the GuestCredential and ApplicationCredential parameters are not used. The cmdlet will use the credentials specified in the backup policy.
|
$session = Get-VEHANARestoreSession
$system = Get-VEHANASystem -Session $session[0]
$database = (Get-VEHANADatabase -System $system)[0]
$restore = Start-VEHANADatabaseRestore -Database $database |
Perform the following steps:
- Run the
Get-VEHANARestoreSessionReturns active restore sessions started to perform operations with backed-up SAP HANA databases. cmdlet. Save the result to the $session variable.
The cmdlet will return an array of restore sessions. Note the ordinal number of the necessary restore session. In this example, it is the first restore session in the array.
- Run the
Get-VEHANASystemReturns information about a backed-up SAP HANA system. cmdlet. Set the first restore session in the $session variable as the Session parameter value.
- Run the
Get-VEHANADatabaseReturns backed-up SAP HANA databases. cmdlet and set the $system variable as the System parameter value. Select the necessary database returned by this command and save it to the $database variable. In this example, it is the first database in the array.
- Run the
Start-VEHANADatabaseRestore cmdlet. Set the $database variable as the Database parameter value.
Save the result to the $restore variable to be able to use it with other cmdlets.
|
Example 2. Restoring Point-in-Time State to Original Location
|
This example shows how to restore a point-in-time state of an SAP HANA database to the original server. Note that in this example, the plug-in on the SAP HANA machine is managed by a protection group in Veeam Backup & Replication, so the GuestCredential and ApplicationCredential parameters are not used. The cmdlet will use the credentials specified in the backup policy.
|
$session = Get-VEHANARestoreSession
$system = Get-VEHANASystem -Session $session[0]
$database = (Get-VEHANADatabase -System $system)[0]
$pit = Get-Date -Date "2026-05-25 15:00:00"
$timezone = Get-TimeZone "Central Europe Standard Time"
$restore = Start-VEHANADatabaseRestore -Database $database -PointInTime $pit -TimeZone $timezone -ClearLog |
Perform the following steps:
- Run the
Get-VEHANARestoreSessionReturns active restore sessions started to perform operations with backed-up SAP HANA databases. cmdlet. Save the result to the $session variable.
The cmdlet will return an array of restore sessions. Note the ordinal number of the necessary restore session. In this example, it is the first restore session in the array.
- Run the
Get-VEHANASystemReturns information about a backed-up SAP HANA system. cmdlet. Set the first restore session in the $session variable as the Session parameter value.
- Run the
Get-VEHANADatabaseReturns backed-up SAP HANA databases. cmdlet and set the $system variable as the System parameter value. Select the necessary database returned by this command and save it to the $database variable. In this example, it is the first database in the array.
- Run the
Get-Date cmdlet and specify the date and time of the state to which you want to restore your database. Save the result to the $pit variable.
- Run the
Get-TimeZone cmdlet and specify the required time zone. Save the result to the $timezone variable.
- Run the
Start-VEHANADatabaseRestore cmdlet. Specify the following settings:
- Set the
$database variable as the Database parameter value.
- Set the
$pit variable as the PointInTime value.
- Set the
$timezone variable as the TimeZone value.
- Provide the
ClearLog parameter to remove all log segments in the log area and restore the database as of the last log backup before the selected point in time. Note that this may cause loss of in-memory data, so perform this action only if the log area is unavailable.
Save the result to the $restore variable to be able to use it with other cmdlets.
|
Example 3. Restoring Tenant Database to Another Server Using Backup Prefix
|
This example shows how to restore a tenant SAP HANA database to another server using a backup prefix. This example uses secure restore.
Note that Veeam Plug-in for SAP HANA must be installed and properly configured on the target server, and the plug-in account must have the necessary permissions. For more information, see the Considerations and Limitations section of the Veeam Explorers User Guide.
|
$session = Get-VEHANARestoreSession
$system = Get-VEHANASystem -Session $session[0]
$database = (Get-VEHANADatabase -System $system)[0]
$guestCredential = Get-Credential
$appCredential = Get-Credential
$newUserPassword = Read-Host -Prompt "Enter password" -AsSecureString
$certificatePassword = Read-Host -Prompt "Enter password" -AsSecureString
$restore = Start-VEHANADatabaseRestore -Database $database -TargetServerName "saphana02" -TargetSystemName "HXE" -Prefix "backup_1" -GuestCredential $guestCredential -ApplicationCredential $appCredential -TargetSystemUserPassword $newUserPassword -UseHttps -UseSSL -ClientCertificatePath "C:/Users/Admin/Desktop/certificate.pfx" ClientCertificatePassword $certificatePassword |
Perform the following steps:
- Run the
Get-VEHANARestoreSessionReturns active restore sessions started to perform operations with backed-up SAP HANA databases. cmdlet. Save the result to the $session variable.
The cmdlet will return an array of restore sessions. Note the ordinal number of the necessary restore session. In this example, it is the first restore session in the array.
- Run the
Get-VEHANASystemReturns information about a backed-up SAP HANA system. cmdlet. Set the first restore session in the $session variable as the Session parameter value.
- Run the
Get-VEHANADatabaseReturns backed-up SAP HANA databases. cmdlet and set the $system variable as the System parameter value. Select the necessary database returned by this command and save it to the $database variable. In this example, it is the first database in the array.
- Run the
Get-Credential cmdlet to create a credential object. Enter the OS (<sid>adm) user and password that will be used for authenticating to the target SAP HANA server. Save the result to the $guestCredential variable.
- Run the
Get-Credential cmdlet to create a credential object. Enter the database user account and password that will be used for authenticating to the target SAP HANA system. Save the result to the $appCredential variable.
- Run the
Read-Host cmdlet. Specify the Prompt parameter value. Provide the AsSecureString parameter. Save the result to the $newUserPassword variable.
- Run the
Read-Host cmdlet. Specify the Prompt parameter value. Provide the AsSecureString parameter. Save the result to the $certificatePassword variable.
- Run the
Start-VEHANADatabaseRestore cmdlet. Specify the following options:
- Set the
$database variable as the Database parameter value.
- Specify the
TargetServerName parameter value.
- Specify the
TargetSystemName parameter value.
- Specify the
Prefix parameter value.
- Set the
$guestCredential variable as the GuestCredential parameter value.
- Set the
$appCredential variable as the ApplicationCredential parameter value.
- Set the
$newUserPassword variable as the TargetSystemUserPassword parameter value.
- Provide the
UseHttps parameter.
- Provide the
UseSSL parameter.
- Specify the
ClientCertificatePath parameter value.
- Set the
$certificatePassword variable as the ClientCertificatePassword parameter value.
Save the result to the $restore variable to be able to use it with other cmdlets.
|
Example 4. Restoring Tenant Database to Another Server Using Specific Backup
|
This example shows how to restore a tenant SAP HANA database to another server using a backup prefix. This example uses secure restore.
Note that Veeam Plug-in for SAP HANA must be installed and properly configured on the target server, and the plug-in account must have the necessary permissions. For more information, see the Considerations and Limitations section of the Veeam Explorers User Guide.
|
$session = Get-VEHANARestoreSession
$system = Get-VEHANASystem -Session $session[0]
$database = (Get-VEHANADatabase -System $system)[0]
$backup = (Get-VEHANABackupCatalogItem -Database $database)[2]
$guestCredential = Get-Credential
$appCredential = Get-Credential
$newUserPassword = Read-Host -Prompt "Enter password" -AsSecureString
$certificatePassword = Read-Host -Prompt "Enter password" -AsSecureString
$restore = Start-VEHANADatabaseRestore -Backup $backup -TargetServerName "saphana02" -TargetSystemName "HXE" -GuestCredential $guestCredential -ApplicationCredential $appCredential -TargetSystemUserPassword $newUserPassword -UseHttps -UseSSL -ClientCertificatePath "C:/Users/Admin/Desktop/certificate.pfx" ClientCertificatePassword $certificatePassword |
Perform the following steps:
- Run the
Get-VEHANARestoreSessionReturns active restore sessions started to perform operations with backed-up SAP HANA databases. cmdlet. Save the result to the $session variable.
The cmdlet will return an array of restore sessions. Note the ordinal number of the necessary restore session. In this example, it is the first restore session in the array.
- Run the
Get-VEHANASystemReturns information about a backed-up SAP HANA system. cmdlet. Set the first restore session in the $session variable as the Session parameter value.
- Run the
Get-VEHANADatabaseReturns backed-up SAP HANA databases. cmdlet and set the $system variable as the System parameter value. Select the necessary database returned by this command and save it to the $database variable. In this example, it is the first database in the array.
- Run the
Get-VEHANABackupCatalogItemReturns backup catalog items for a specific SAP HANA database. cmdlet and set the $database variable as the Database parameter value. Select the necessary backup returned by this command and save it to the $backup variable. In this example, it is the third backup in the array.
- Run the
Get-Credential cmdlet to create a credential object. Enter the OS (<sid>adm) user and password that will be used for authenticating to the target SAP HANA server. Save the result to the $guestCredential variable.
- Run the
Get-Credential cmdlet to create a credential object. Enter the database user account and password that will be used for authenticating to the target SAP HANA system. Save the result to the $appCredential variable.
- Run the
Read-Host cmdlet. Specify the Prompt parameter value. Provide the AsSecureString parameter. Save the result to the $newUserPassword variable.
- Run the
Read-Host cmdlet. Specify the Prompt parameter value. Provide the AsSecureString parameter. Save the result to the $certificatePassword variable.
- Run the
Start-VEHANADatabaseRestore cmdlet. Specify the following options:
- Set the
$backup variable as the Backup parameter value.
- Specify the
TargetServerName parameter value.
- Specify the
TargetSystemName parameter value.
- Set the
$guestCredential variable as the GuestCredential parameter value.
- Set the
$appCredential variable as the ApplicationCredential parameter value.
- Set the
$newUserPassword variable as the TargetSystemUserPassword parameter value.
- Provide the
UseHttps parameter.
- Provide the
UseSSL parameter.
- Specify the
ClientCertificatePath parameter value.
- Set the
$certificatePassword variable as the ClientCertificatePassword parameter value.
Save the result to the $restore variable to be able to use it with other cmdlets.
|
Notes
Start-VEHANADatabaseRestore replaces the deprecated cmdlet Restore-VEHANADatabase. The old cmdlet still works (as an alias of the new cmdlet, with identical functionality), but it may be removed in a future version.
Related Commands