dell-democenter

MODULE 5 - PROTECT & RESTORE ORACLE DATABASE FROM POWERSHELL

LESSON 1 - PROTECT ORACLE DATABASES

In this Lesson we Create a Protection Policy for Oracle Centralized Protection We alo need to create the following Credentials:

Credential Name: oracle
User Name: oracle
Password: Password123!

This time we will pass a credentials string to the New-PPDMcredentials

Creating the Credential

$username="oracle"
$credentialname="oracle"
$password="Password123!"
$Securestring=ConvertTo-SecureString -AsPlainText -String $Password -Force
$Credentials = New-Object System.Management.Automation.PSCredential($username, $Securestring)
$OraCreds=New-PPDMcredentials -type OS -name $credentialname -authmethod BASIC -credentials $Credentials
$OraCreds

Alt text

Storage System

Again, we read our Storage System

$StorageSystem=Get-PPDMStorage_systems -Type DATA_DOMAIN_SYSTEM -Filter {name eq "ddve-01.demo.local"}

Creating a Database Schedule

The following Backup Schedule is required: Full:

Recurrence: Hourly
Keep for: 5 Days
Start Time: 8:00 PM
End Time: 6:00 AM
Log:
Recurrence : 15 minutes
Start: 08:00 PM
End: 06:00 AM

$OraSchedule=New-PPDMDatabaseBackupSchedule -hourly -CreateCopyIntervalHrs 1 -RetentionUnit DAY -RetentionInterval 5 -starttime 8:00PM -endtime 6:00AM -LogBackupUnit MINUTELY -LogBackupInterval 15

Creating the Protection Policy

Name: Oracle DEV
Description: Oracle DB Backup

$Policy=New-PPDMOracleBackupPolicy -Schedule $OraSchedule -Name "Oracle DEV" -Description "Oracle DB Backup" -dbCID $OraCreds.id -StorageSystemID $StorageSystem.id

Alt text

Assign an Asset

First, find the Asset

DatabaseName: oracl

$Asset=Get-PPDMassets -type ORACLE_DATABASE -filter 'details.database.clusterName eq "oracle01.demo.local" and name eq "orcl"'
$Asset

Alt text

Assign the Asset to the Poliocy

Add-PPDMProtection_policy_assignment -id $Policy.id -AssetID $Asset.id
$Policy | Get-PPDMprotection_policies

Alt text

Watch the Activities

Get-PPDMactivities -PredefinedFilter SYSTEM_JOBS -pageSize 2

Alt text

repeat until the Assets Configuration reaches state=COMPLETED

START ADHOC BACKUP FOR ORACLE DATABASE

Start an AdHoc Protection and monitor the Protection Job

Start-PPDMprotection -AssetIDs $Asset.id -StageID $Policy.stages[0].id -PolicyID $Policy.id
Get-PPDMactivities -PredefinedFilter PROTECTION_JOBS -pageSize 2

Alt text

TLDR

«Module 4 Lesson 4 This Concludes Module 5 Lesson 1 Module 5 Lesson 2»