How to restore NT File System permissions only (including share permissions if applicable) to existing folders and their sub-folders without restoring the folder contents

Article: 100017210
Last Published: 2019-01-04
Ratings: 1 1
Product(s): NetBackup & Alta Data Protection

 

Description

 
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.
 
Example:
It is necessary to feed bprestore a list of selections to restore and not restore from a list file (text file). The following example will restore C:\temp and three sub folders,  but no files contained therein:

1. From the parent directory on the file system to which you would like to restore permissions, run 'dir /s /ad /B' and output results to a file

2. Use a text editor to cut/paste the resulting dir command output file and insert exclude statements for each until your list file list looks something like this (and name it restorelist.txt):

C:\temp\
!C:\temp\*
C:\temp\misc\
!C:\temp\misc\*
C:\temp\MP2\
!C:\temp\MP2\*
C:\temp\unzip\
!C:\temp\unzip\*
C:\data folder\sub folder\
!C:\data folder\sub folder\*

Note: Lines starting with a '!' and ending with '*' are exclusions. Those lines exclude any files and sub folders from being restored (overwritten). You do not need to add double quote sign (") for folder names with white space.


3. The bprestore command syntax is: bprestore -s<start_date> -e <end_date> <path_folder_to_be_restored\><!path_folder_to_be_restored\*>

Example:
The following command will restore the folders within the list file restorelist.txt from a backup performed on 5/13/2018 between 8 AM and 9:12 AM:

bprestore -s 05/13/2018 08:00:00 -e 05/13/2018 09:12:00 -f c:\restorelist.txt


As a result, the folders and their permissions are recreated,  but none of the files contained inside the folders are restored (overwritten).

Note: The procedure in this article  will work with Windows file system policies only, and is not applicable to  VMware or Flashbackup policies.

Was this content helpful?