Skip to content

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

@brampamp

Description

@brampamp

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions