Replies: 1 comment
-
Moved to Issue #8921 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using the -BackupRestore method, for copying databases, I am seeing the backup files being left behind. The problem occurs when the -SharedPath is not available to the location that is executing the Powershell. In this case I believe that the code is intended to fall back on an
_EXEC master.sys.xp_delete__file
call but this is not happening.The errant code appears to be around line 1250 in Copy-DbaDatabase.ps1 which reads:
if (Test-Path $backupFile -ErrorAction Stop) {
This is not allowing an exception to be throw so the alternate method in the catch block is bypassed.
Best regards
Beta Was this translation helpful? Give feedback.
All reactions