PS>TerminatingError(Restore-VESQLDatabase): "The specified file already exists on the target server."
Restore-VESQLDatabase : The specified file already exists on the target server.
At D:\Scripts\<MyScriptName>.ps1:139 char:9
+ Restore-VESQLDatabase -ServerName $setToSQLServer -Database $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Restore-VESQLDatabase], Exception
+ FullyQualifiedErrorId : System.Exception,Veeam.SQL.PowerShell.RestoreVESQLDatabaseCmdlet
I am using the -Force command. The odd thing is that the script restores database A fine (which also already exists on the target server) but I get this message when it attempts to restore database B.
After some further research it turns out when we moved the script someone else changed the location of the log file and the script was looking at the old location. I've updated my script to look at the new location.