Commvault / CVPowershellSDK

Developer SDK - Powershell
12 stars 12 forks source link

Restore-CVSQLDatabase - LogFilePath not being correctly set/passed to Commvault. #27

Open brampamp opened 3 years ago

brampamp commented 3 years ago

Hi All,

As the subject says, when using Restore-CVSQLDatabase to restore a DB using -outofplace it doesn't seem to pass the LogFilePath through to Commvault and both the DB and LOG files are written to the DataFilePath. Here's the pertinent bits from my code...

$DataFilePath = "G:\MSSQL\Data"
$logFilePath = "H:\MSSQL\Data"

Get-CVSQLDatabase -ClientName $client -InstanceName $instance -Name $dbname |
Restore-CVSQLDatabase -OutofPlace -DestClientName $destclient -DestInstanceName $destinstance -DataFilePath $DataFilePath -LogFilePath $logFilePath -DestDatabaseName $dbname -OverwriteExisting -Confirm:$false 

And here's the relevant line from the Commvault logs for the job showing both files writing to the G: drive: 9640 2a04 04/28 11:41:52 6371044 CCvSQLVDIBase::StartDBRestore() - !!!!QUERY: [RESTORE DATABASE [xxxxxxxxxxxxxxx] FROM VIRTUAL_DEVICE = 'ed29f4e7-8ce5-40d6-934b-dabe8e7212ea', VIRTUAL_DEVICE = 'ed29f4e7-8ce5-40d6-934b-dabe8e7212ea_1' WITH NORECOVERY, MAXTRANSFERSIZE=2097152, BLOCKSIZE=65536, BUFFERCOUNT=20, REPLACE, MOVE N'xxxxxxxxxxxxxxx_log' TO N'G:\MSSQL\Data\xxxxxxxxxxxxxxx_log.ldf', MOVE N'xxxxxxxxxxxxxxx' TO N'G:\MSSQL\Data\xxxxxxxxxxxxxxx.mdf'].

Useful info: PowerShell Module Version - 2.0.10 Commvault Version - 11 SP22.17

Hope you can help.

Bramp

mdaniou commented 2 years ago

I am interested too.

mdaniou commented 2 years ago

I opened an incident at Commvault's support.

mdaniou commented 1 year ago

Any chance to see progress here ?

mdaniou commented 9 months ago

I'd love to have this being fixed :(