dbatools Required Filesystem Access for Database Restores
The Problem
While performing an instance migration this spring, I happened upon something I didn’t expect in dbatools
. It should have been a simple backup/restore copy of the databases, with the backup files residing on a fileshare on the destination server after being copied there. I kept getting a warning that the backup files I was attempting to restore couldn’t be read, and the restores (via Restore-DbaDatabase
) wouldn’t execute.
I checked permissions on the server over and over again. Both on the filesystem and for the share that I was attempting to read from. Even more curious, if I executed the restore database
statements directly from within Management Studio, the databases restored without issue.