Skip to content

Copy-DbaDatabase - Pass IgnoreFileChecks to Backup-DbaDatabase for UNC paths#10360

Open
andreasjordan wants to merge 1 commit intodevelopmentfrom
claude/issue-10286-20260423-0624
Open

Copy-DbaDatabase - Pass IgnoreFileChecks to Backup-DbaDatabase for UNC paths#10360
andreasjordan wants to merge 1 commit intodevelopmentfrom
claude/issue-10286-20260423-0624

Conversation

@andreasjordan
Copy link
Copy Markdown
Collaborator

When xp_fileexist fails (e.g. due to certificate issues introduced with Azure cert signing), Test-DbaPath returns $false. Copy-DbaDatabase already handles this gracefully with a "Trying anyway" message, but was calling Backup-DbaDatabase without -IgnoreFileChecks. This caused Backup-DbaDatabase to run its own internal Test-DbaPath check, fail, and abort before attempting the backup.

Adds -IgnoreFileChecks to the non-Azure Backup-DbaDatabase calls inside Copy-DbaDatabase. Copy-DbaDatabase already validates path accessibility separately, so the redundant internal check is safe to skip.

Fixes #10286

Generated with Claude Code) | [View branch](https://github.com/dataplat/dbatools/tree/claude/issue-10286-20260423-0624

…C paths

When xp_fileexist fails (e.g. due to certificate issues), Test-DbaPath returns
false. Copy-DbaDatabase already handles this gracefully with a "Trying anyway"
message, but then called Backup-DbaDatabase without -IgnoreFileChecks, causing
Backup-DbaDatabase to run its own Test-DbaPath check, fail, and abort.

Adding -IgnoreFileChecks to the non-Azure Backup-DbaDatabase calls skips the
redundant internal path check (Copy-DbaDatabase already validates paths) so the
backup proceeds when the SQL Server service account can actually access the path.

Fixes #10286

(do Copy-DbaDatabase)

Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
@andreasjordan
Copy link
Copy Markdown
Collaborator Author

Test fails with:
image

@mmaagk642
Copy link
Copy Markdown

mmaagk642 commented Apr 23, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy-DbaDatabase no longer works after azure cert signing was introduced

2 participants