PowerShell script exchange
Post Reply
Igor.Demin
Novice
Posts: 4
Liked: never
Joined: Nov 02, 2021 2:07 pm
Full Name: Igor Demin
Contact:

Restore-VEORDatabase problem in Veeam 11a

Post by Igor.Demin »

Hello!

In B&R version 10 we use this simple script to restore Oracle database from PROD to TEST server with changing DB name and DB files path all was working fine:

Code: Select all

$VeeamUser = "ServiceUser"
$VeeamPassword = "Password" | ConvertTo-SecureString -AsPlainText -Force
$ORA12TSTCreds = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $VeeamUser, $VeeamPassword
$SecurePassword = "Password" | ConvertTo-SecureString -AsPlainText -Force
$RestorePoint = Get-VBRApplicationRestorePoint -Oracle -Name "AIS-ORA12-01" | ?{$_.IsCorrupted -eq $False} | Sort-Object -Property CreationTime -Descending | Select -First 1
$Session = Start-VEORRestoreSession -RestorePoint $RestorePoint[0]
$Database = Get-VEORDatabase -Session $Session[0] -Name "MAINDB.Intourist.local"
$NewDBPath = "D:\WORKCOPYDB\ORADATA\"
$NewDBPathFRA = "D:\WORKCOPYDB\FAST_RECOVERY_AREA\"
$FilesPath = Get-VEORDatabaseFile -Database $Database
$NewFilesPath = $FilesPath.Path -replace "^\w:\\.+\\(\w+\.\w+)","$NewDBPath`$1"
$NewFilesPath = $NewFilesPath -replace ".+\\(CONTROL02.CTL)","$NewDBPathFRA`$1"
Restore-VEORDatabase -Database $Database -Server "AIS-ORA12TST-01" -OracleSid "WORKCOPYDB" -GlobalDatabaseName "WORKCOPYDB.Intourist.local" -OracleHome "C:\Oracle\product\12.1.0\dbhome_1" -OracleHomePassword $SecurePassword -WindowsCredentials $ORA12TSTCreds -File $FilesPath -TargetPath $NewFilesPath -Force
Stop-VEORRestoreSession -Session $Session[0]
Now this code don`t work, first it stops working on 11 version, after update to 11a problem still exist. If i manually debug this problem appears on last step where i`m changing DB files path to new one.
It looks kind a bug, in docs this part wasn`t change $NewFilesPath is TypeName: System.String but job tries to recover DB on same paths as PROD server has and because it has disks letters that not available on test server restore ends with error.

Code: Select all

Restore-VEORDatabase : Failed to create folder: u:\.  The system cannot find the path specified.
At line:1 char:1
+ Restore-VEORDatabase -Database $Database -Server "AIS-ORA12TST-01" -O ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Restore-VEORDatabase], Exception
    + FullyQualifiedErrorId : System.Exception,Veeam.Oracle.PowerShell.RestoreVEORDatabaseCmdlet
Any help will be appreciated.
Thank you.
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Restore-VEORDatabase problem in Veeam 11a

Post by oleg.feoktistov »

Hi Igor,

Talked to QA. Looks like a bug, indeed. Could I ask you to open a support ticket and upload logs?
We would need to investigate it further to know for sure. Please, also share case id here so that we could follow-up on it from R&D side.

Thanks,
Oleg
Igor.Demin
Novice
Posts: 4
Liked: never
Joined: Nov 02, 2021 2:07 pm
Full Name: Igor Demin
Contact:

Re: Restore-VEORDatabase problem in Veeam 11a

Post by Igor.Demin »

Hello Oleg,

thank you for reply, problem is, that our supports ends this year (ID: #02103088) and we don`t prolongate it, can i make a ticket as for Veeam B&R Community Edition version in this case?
Gostev
Chief Product Officer
Posts: 31816
Liked: 7302 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Restore-VEORDatabase problem in Veeam 11a

Post by Gostev »

No, as your environment does not run Community Edition (which does not have the above-mentioned functionality to start with). So if you want to pursue getting this resolved, you will have to get your maintenance agreement back in order. Thanks!
Igor.Demin
Novice
Posts: 4
Liked: never
Joined: Nov 02, 2021 2:07 pm
Full Name: Igor Demin
Contact:

Re: Restore-VEORDatabase problem in Veeam 11a

Post by Igor.Demin »

So what options do we have?

I think this is a bug in 11 version, i don`t need extra or private support on this case i just inform you about "possible problem" in your software. Can share this info with your test department or someone who can check this and maybe fix in future releases of your software?

For me it will be enough =)
Gostev
Chief Product Officer
Posts: 31816
Liked: 7302 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Restore-VEORDatabase problem in Veeam 11a

Post by Gostev »

If you read the first reply from Oleg above, he already talked with our test department about this...
Apparently the issue might be specific to your environment, which is why support case was requested.

By the way, even if it IS a bug that will be fixed in future releases, without active maintenance agreement you won't be able to install them anyway?
Igor.Demin
Novice
Posts: 4
Liked: never
Joined: Nov 02, 2021 2:07 pm
Full Name: Igor Demin
Contact:

Re: Restore-VEORDatabase problem in Veeam 11a

Post by Igor.Demin »

Thank you.

About your question of future updates - I already rolled back to 10 version, but not me making decisions to prolongate support or not, my mission is technical job, hope our support will be renewed someday.

Wish you all the best, bye.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests