How to restore NT File System permissions only (including share permissions if applicable) to an existing folder
Problem
How to restore NT File System permissions only (including share permissions if applicable) to an existing folder.
Solution
The NetBackup Backup, Archive and Restore user interface does not allow you to restore just a folder or just the folder structure without restoring some of the folder contents. This is a problem in the event that the NTFS permissions were accidentally removed from a folder or share, but the folder/share contents are intact. In this situation, the administrator would only need to restore the folder/share permissions and not some or all of the contents of that folder.
Note: The procedure in this article will work with Windows file system policies only, and is not applicable to VMware or Flashbackup policies.
1. From command-line, use the bprestore
command found at <install_path>\NetBackup\bin\ to restore only the parent folder NTFS permissions (and share permissions if applicable), while excluding all subfolders and files.bprestore -s <start_date> -e <end_date> <path_folder_to_be_restored\> <!path_folder_to_be_restored\*>
Example (Figure 1):
The following command restores a folder named 'test' to the root of the C: volume, which was backed up between 1PM and 2PM on 2/5/2005, while excluding everything contained inside the folder 'test':bprestore -s 02/05/2005 13:00:00 -e 02/05/2005 14:00:00 C:\test\ !C:\test\*
Figure 1
2. If the folder restored was a share, the Windows 'Server' service must be restarted for the share to become reactivated.
Note: If the parent folder already exists with subfolders and files prior to restore, the restored parent folder permissions will not automatically propagate down to existing subfolders and files.
Note 2: The drive letter, path, and files specified are case sensitive. The specified drive letter must be upper case and the path and file names must match exact case character for character or the job will finish as "incomplete" Status 5, and this message will be listed in the Activity Monitor | Job Details | Detailed Status tab:The restore failed to recover the requested files(5)