Jump to content











Photo
- - - - -

Tool to backup \ restore NTFS permissions


  • Please log in to reply
No replies to this topic

#1 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 229 posts

Posted 29 April 2012 - 02:08 PM

saveperm.exe and restperm.exe are two command-line tools created to backup and restore NTFS permissions of a drive or a folder. Both of the tools are taking two parameters. The first pointing the drive or the folder and the second , the binary file storing the NTFS permissions.

Usage examples :

Backup the NTFS permissions of drive E :

saveperm E: permissions.bin

Restore the NTFS permissions of drive E :

restperm E: permissions.bin

Backup the NTFS permissions of the folder C:\test

saveperm C:\test testperm.bin

Restore the NTFS permissions of the folder C:\test

restperm C:\test testperm.bin

The binary file containing the permissions is filled with NTFS security descriptor information. It's very important to note that the drive or the folder restoring the NTFS permissions should have EXACTLY the same folder and file structure possessed by the original drive \ folder. If it's the case of a system partition, failing to do so can lead to serious NTFS conflicts resulting in an unbootable operating system.

saveperm.exe records the following NTFS informations :

Owner security information

Group security information

DACL security information

SACL security information

If you have a Win PE 1 \ 2 \ 3.x or a BartPE disc, you can easily perform a file-level backup of your Windows XP \ Server 2003 installation with the 7-Zip command-line tool and saveperm.exe

a) Get a copy of 7-Zip command-line version.
B) Place the 7-Zip and saveperm.exe \ restperm.exe tools to a location accessible from the Win PE \ BartPE environment.
c) Restart your system with a Win PE \ Bart PE disc.
d) Backup the system :

X:\7z\saveperm.exe C: X:\7z\C-NTFS-perms.bin

move X:\7z\C-NTFS-perms.bin C:\C-NTFS-perms.bin

X:\7z\7za.exe a -t7z -mtc=on -mx5 Z:\Srv2003DC.7z C:\* >backup.txt

e) To restore the system :

X:\7z\7za.exe x Z:\Srv2003DC.7z -oC:\ >restore.txt

move C:\C-NTFS-perms.bin X:\7z\C-NTFS-perms.bin

X:\7z\restperm.exe C: X:\7z\C-NTFS-perms.bin

X points the system partition of the Win PE system. You can specify a network drive ( Z in the example ) or another partition to perform the backup.

The above example backups and restores a Windows Server 2003 domain controller in a test network. The same procedure can be used for a Windows XP system. The installation having a size of 1596 Mb is compressed to 355 Mb with 7z.

Doing a backup of a Vista \ Server 2008 \ 7 installation is more complicated as another NTFS specific feature, symbolic links are introduced to those systems to maintain backward compatibility with older folder naming conventions. I didn't test those systems.

Download :

BackupNtfsPermV090.zip




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users