Restoring db as files

Mohamed jihad bayali 1,101 Reputation points
2023-03-21T12:22:28.7133333+00:00

Hello,

I want to restore DB as files on another destination server,

I created a fileshare on a SA, i mounted the fileshare on the destination server (Z drive letter)

I gave the permissions to the NT System account on the file share :

  • Run PsExec -s cmd to enter into NT AUTHORITY\SYSTEM shell
    • Execute cmdkey /add:<storageacct>.file.core.windows.net /user:AZURE\<storageacct> /pass:<storagekey>
    • Verify access with dir \\<storageacct>.file.core.windows.net\<filesharename>
  • Kick off a restore as files from the Backup Vault to \\<storageacct>.file.core.windows.net\<filesharename> as the path

When i restore the db as files from azure backup, i choose the destination server, then i chose the path Z:\Myfolder

When triggering the restore i get the error message :

UserErrorRestoreTargetDirectoriesAbsent

Please follow the steps mentioned below and retry the operation. 1) Ensure that you provide the correct target physical path during Restore->Advanced Configurations. Make sure that the folder where data files need to be restored exists on the destination. 2) During 'Restore as files', if the target destination is an Azure file share mounted on the registered virtual machine, ensure that appropriate access permissions are configured on the virtual machine for the Azure file share. Please refer to https://aka.ms/AA9opck for more details.

Any idea please?

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,134 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SadiqhAhmed-MSFT 38,401 Reputation points Microsoft Employee
    2023-03-21T13:01:21.3+00:00

    Hi @Mohamed jihad bayali Thank you for reaching out to us on Microsoft Q&A platform. Happy to help! I understand that you are trying to perform restore as files and it seems to be blocking with permissions issue. Did you follow the recommended steps from the link - I [understand that you are trying to perform restore as files and it seems to be blocking with permissions issue. Did you follow the recommended steps from the link - https://aka.ms/AA9opcktps://aka.ms/AA9opck User's image

    ](https://aka.ms/AA9opck)

    If yes, I would suggest you to confirm if there are restore points exist. If there is no backup, no restore is possible. Meaning, if restore point does not exist, you cannot perform the restore operation.

    If the response helped, do "Accept Answer" and up-vote it

    1 person found this answer helpful.
    0 comments No comments