Andy Levy shares a lesson learned:
While performing an instance migration this spring, I happened upon something I didn’t expect in
[dbatools]
(https://dbatools.io/). 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 (viaRestore-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.After doing quite a bit of digging, I managed to find the reason.
Read on to learn more about necessary permissions, as well as the issue Andy hit, as well as the solution.