Symptoms
You are restoring Active Directory databases to a network share outside of your domain.
Restore fails with:
Error: 0x4001A
Path = "\\?\UNC\XXX.XXX.XXX.XXX\share\Drive(C)\Windows\sysvol\domain\Policies\{01F10AEA-AEC8-4A07-9D1D-660342BA956A}\GPT.INI",
Hints = 1 (0x1),
$module = "ad_agent_vs_50141"
Tag: 0xA8A1022BD18AE50B
Access to the file is denied.
Error: 0x40014
function = "CreateFileW",
path = "\\?\UNC\XXX.XXX.XXX.XXX\share\Drive(C)\Windows\sysvol\domain\Policies\{01F10AEA-AEC8-4A07-9D1D-660342BA956A}\GPT.INI",
$module = "ad_agent_vs_50141"
Tag: 0xA8A1022BD18AE040
Access is denied
Error: 0xFFF0
code = 2147942405 (0x80070005),
$module = "ad_agent_vs_50141"
Tag: 0xBD28FDBD64EDB8EE
Cause
Permissions conflict. During recovery of Active Directory databases, recovered folders have specific permissions to allow access to domain users only. Since the backup is located on network share, the recovery process has to impersonate the user that has access to share; since the share is not in the domain, the share user does not have access to the recovered files and thus recovery fails.
Solution
You need to either recover the databases to a local folder or to a network share in the domain and use domain administrator credentials.