Examples of Use
This section will describe how to use a PowerShell script to restore an Oracle database to an original location on a Linux VM.
To restore an Oracle database, use the Restore-VEORDatabase cmdlet. This cmdlet includes two cmdlet sets: a set to restore to Windows VMs, and a set to restore to Linux VMs.
To perform a basic restore, we must specify the following settings:
- The Oracle database — to specify the Oracle database that you want to restore.
- Linux credentials — to specify Linux credentials that the cmdlet will use to connect to the Linux VM.
The cmdlet treats these settings as objects. We will get these objects and save them to variables:
- To specify the Oracle database that we want to restore:
- We will run the Get-VEORRestoreSession cmdlet to get an active Oracle restore session that contains the Oracle database object. We will save the result to the $session variable.
$session = Get-VEORRestoreSession |
- We will get the Oracle database that we want to restore. We will assign the Session parameter with the $session variable to specify the restore session. We will save the result to the $database variable.
$database = Get-VEORDatabase -Session $session |
- Now we will run the Restore-VEORDatabase cmdlet to initiate the restore procedure. We will use the Database parameter with the $database variable to specify the Oracle database that we want to restore.
Restore-VEORDatabase -Database $database -Server "Oracle_Server" |