Export-VEORDatabase

In this article

    Short Description

    Exports backed-up Oracle databases.

    Applies to Veeam Backup & Replication

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

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • Export Oracle databases from backups created on Windows VMs.

    Export-VEORDatabase [-Database] <VEORDatabase> [-Path] <string> [-ToDateTime <datetime>] [-Server <string>][-WindowsCredentials <pscredential>] [-Force] [-EnableRmanBackup] [-OracleHome <string>] [-RmanBackupFormat <string>] [-RmanBackupTagName <string>] [-RmanBackupEnableCompression][-ChannelsNumber <int>] [-OracleHomePassword <securestring>] [<CommonParameters>]

    • Export Oracle databases from backups created on Linux VMs.

    Export-VEORDatabase [-Database] <VEORDatabase> [-Path] <string> -LinuxCredentials <VEORLinuxCredential> [-ToDateTime <datetime>] [-Server <string>] [-SshPort <int>] [-Force] [-EnableRmanBackup] [-OracleHome <string>][-RmanBackupFormat <string>] [-RmanBackupTagName <string>] [-ChannelsNumber <int>] [-RmanBackupEnableCompression]  [<CommonParameters>]

    Detailed Description

    This cmdlet exports backed-up Oracle databases.

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    Database

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

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

    True

    0

    True (ByValue)

    Path

    Specifies the target path. The cmdlet will export a database to the location specified in this path.

    String

    True

    1

    False

    LinuxCredentials

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

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

    False

    Named

    False

    ToDateTime

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

    DateTime

    False

    Named

    False

    Server

    Specifies a name of the target staging Oracle server.

    String

    False

    Named

    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

    WindowsCredentials

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

    PSCredential

    False

    Named

    False

    Force

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

    If you provide this parameter, the cmdlet will show no prompt before executing the command. Otherwise, the cmdlet will keep the existing version of Oracle database files.

    SwitchParameter

    False

    Named

    False

    OracleHome

    For export to another location or to a staging server.

    Specifies the target Oracle home path. The cmdlet will use this Oracle home path on the staging server.

    String

    False

    Named

    False

    OracleHomePassword

    For exporting 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

    EnableRmanBackup

    Defines that the cmdlet will export Oracle databases using Oracle RMAN.

    If you do not specify this parameter, the cmdlet will not apply Oracle RMAN to export Oracle databases.

    SwitchParameter

    False

    Named

    False

    RmanBackupFormat

    Specifies the FORMAT parameter of backed-up database files. The cmdlet will export Oracle databases using the specified FORMAT parameter.

    String

    False

    Named

    False

    RmanBackupTagName

    Specifies tags of backed-up database files. The cmdlet will export Oracle databases using the specified tags.

    String

    False

    Named

    False

    RmanBackupEnableCompression

    Defines that the cmdlet will back up Oracle databases with compression.

    If you do not specify this parameter, the cmdlet will export Oracle databases without compression.

    SwitchParameter

    False

    Named

    False

    ChannelsNumber

    Specifies a number of channels that will be used to export Oracle databases.

    Default: 4

    Permitted value: 1-255.

    Int32

    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 Docs.

    Examples

    Export-VEORDatabaseExample 1. [Windows-Based] Exporting Oracle Database Files from Backup

    This example shows how to export an Oracle database files from a backup of an Oracle database that was created on a Windows VM.

    $session = Get-VEORRestoreSession

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

    $creds = Get-Credential

    Export-VEORDatabase -Database $database -Path "C:\Users\Administrator.TECH\Desktop\delme_pu" -Server "Oracle_Server"

    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 first 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 Get-Credential cmdlet. Save the result to the $creds variable.
    3. Run the Export-VEORDatabase cmdlet. Specify the following settings:
    • Set the $database variable as the Database parameter value.
    • Specify the Path parameter value.
    • Specify the Server parameter value.

    Export-VEORDatabaseExample 2. [Oracle-Based] Exporting Oracle Database Files from Backup

    This example shows how to export an Oracle database files from a backup of an Oracle database that was created on an Oracle VM.

    $session = Get-VEORRestoreSession

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

    $securepassword = Read-Host -Prompt "Enter password" -AsSecureString

    $linuxcreds = New-VEORLinuxCredential -Account "root" -Password $securepassword

    Export-VEORDatabase -Database $database -Path "C:\Users\Administrator.TECH\Desktop\delme_pu2" -LinuxCredentials $linuxcreds

    Perform the following steps:

    1. Get the restore session:
    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 first 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.
    1. Get Linux credentials:
    1. Run the Read-Host cmdlet. Specify the Prompt parameter value. Specify the AsSecureString parameter. Save the result to the $securepassword variable.
    2. Run the New-VEORLinuxCredential cmdlet. Specify the Account parameter value. Set the $securepassword as the Password parameter value.
    1. Run the Export-VEORDatabase cmdlet. Specify the following settings:
    • Set the $database variable as the Database parameter value.
    • Specify the Path parameter value.
    • Set the $linuxcreds as the LinuxCredentials parameter value.

    Related Commands