This is an archive version of the document. To get the most up-to-date information, see the current version.

Restore-VEORDatabase

In this article

    Short Description

    Restores backed-up Oracle databases.

    Applies to Veeam Backup & Replication

    Product Edition: Enterprise, Enterprise Plus

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • To restore to Windows VMs:

    Restore-VEORDatabase [-Database] <VEORDatabase> [-Server <string>] [-OracleHome <string>] [-GlobalDatabaseName <string>] [-OracleSid <string>] [-WindowsCredentials <pscredential>] [-OracleHomePassword <securestring>] [-ToDateTime <datetime>] [-File <VEORDatabaseFile[]>] [-TargetPath <string[]>] [-Force]  [<CommonParameters>]

    • To restore to Linux VMs:

    Restore-VEORDatabase [-Database] <VEORDatabase> -LinuxCredentials <VEORLinuxCredential> [-Server <string>][-OracleHome <string>] [-GlobalDatabaseName <string>] [-OracleSid <string>] [-SshPort <int>] [-ToDateTime<datetime>] [-File <VEORDatabaseFile[]>] [-TargetPath <string[]>] [-Force]  [<CommonParameters>]

    Detailed Description

    This cmdlet restores backed-up Oracle databases. You can restore Oracle databases to Windows VMs or to Linux VMs.

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    Accept Wildcard Characters

    Database

    Specifies an Oracle database. The cmdlet will restore this database.

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

    True

    0

    True (ByValue)

    False

    LinuxCredentials

    Specifies Linux credentials. The cmdlet will use these credentials to connect to the Linux VM.

    Accepts the VEORLinuxCredentials object. To get this object, run the New-VEORLinuxCredential cmdlet.

    True

    Named

    False

    False

    Server

    Specifies a name of the target Oracle server. The cmdlet will restore an Oracle database to that server.

    String

    False

    Named

    False

    False

    OracleHome

    For restore to another location.

    Specifies the target Oracle Home path. The cmdlet will restore an Oracle database to the location specified in the Oracle Home path.

    String

    False

    Named

    False

    False

    GlobalDatabaseName

    For restore to another location.

    Specifies the global database name. The cmdlet will restore an Oracle database with the specified name.

    String

    False

    Named

    False

    False

    OracleSid

    For restore to another location.

    Specifies a new SID for an Oracle database. The cmdlet will restore the database with the specified SID.

    String

    False

    Named

    False

    False

    WindowsCredentials

    Specifies Windows credentials. The cmdlet will use these credentials to connect to the Windows VM.

    PSCredential

    False

    Named

    False

    False

    OracleHomePassword

    For restoring Oracle Database 12c or later on Windows server.

    Specifies Oracle Home credentials. The cmdlet will use these credentials for starting Oracle Services on the VM guest OS.

    NOTE: This parameter is required in case you use the following types of Oracle Home User:

    • Existing Windows user
    • New Windows user

    SecureString

    False

    Named

    False

    False

    ToDateTime

    Specifies a restore period. The cmdlet will restore the Oracle database to the specified period.

    Datetime

    False

    Named

    False

    False

    File

    Specifies an array of Oracle database files.

    Accepts the VEORDatabaseFile[] object. To get this object, run the Get-VEORDatabaseFile cmdlet.

    False

    Named

    False

    False

    TargetPath

    Specifies the target path array. The cmdlet will restore the Oracle database files to the locations, specified in the array.

    NOTE: For every Oracle database file you must assign the specific file path.

    String[]

    False

    Named

    False

    False

    Force

    Indicates that the cmdlet will overwrite the existing Oracle database with the database from backup.

    NOTE: The cmdlet will show no prompt before executing the command.

    SwitchParameter

    False

    Named

    False

    False

    SshPort

    Specifies the SSH port number. The cmdlet will use that port to connect to the Linux VM.

    Default: 22.

    Int32

    False

    Named

    False

    False

    <CommonParameters>

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

    Examples

    Restoring to Original Location

    This example shows how to restore an Oracle database to the original location.

    $session = Get-VEORRestoreSession

    $database = Get-VEORDatabase -Session $session[0]

    Restore-VEORDatabase -Database $database -Server "Oracle_Server"

    You must perform the following steps:

    1. Run the Get-VEORRestoreSession cmdlet. Save the result to the $session variable.

    The Get-VEORRestoreSession cmdlet will return an array of active restore sessions. Mind the ordinal number of the necessary restore session (in our example, it is the second restore session in the array).

    1. Run the Get-VEORDatabase cmdlet. Set the $session variable as the Session parameter value. Save the result to the $database variable.
    2. Run the Restore-VESQLDatabase cmdlet. Set the $database variable as the Database parameter value. Specify the Server parameter value.

    Related Commands