Backup and Restore permissions

This Script/Process is all about backing up permissions & restoring when required.

This was the requirement from one of the projects, as their backup software was not able to take permissions backup, therefore on restoring, permissions were not getting applied.

Thanks to Powershell & Creator of File System Security PowerShell Module 4.0.1 which has come to our rescue 🙂

Here is the process /scripts that will accomplish this task, Download the zip file from below link & extract it.

https://gallery.technet.microsoft.com/scriptcenter/Backup-and-Restore-4bae5a26

 

First let’s follow the process to backup permissions:

Update the file named : folderstobackup.txt

Now just schedule the batch file from task scheduler as per requirements/frequency needed

you can execute it manually in case manual dump of permissions is required.

Backup will be dumped inside the backup folder & time stamp will be added:

 

Now lets check how to restore the file permissions or folder permissions or entire permission set till root path.

Go back to the root folder & execute restore.bat, It will prompt you for the information of dump file from which you want to restore the permissions.

Example:

E:\scripts\Backup-RestorePerm\Backup\backup_1-11-2016_3-58AM\server01_scripts_.csv

 

———————————————————————————————————-

Provide the path of folder, file or root path to restore..

For example:

\\server01\e$\scripts\ADDaccesstoResource or

\\server01\e$\scripts\ADDaccesstoResource\readme.txt or

\\server01\e$\scripts

———————————————————————————————————-

It will further ask  ,if you want to include subfolders in permission restore(Type Yes or No –> Y & N will  not work)

 

It will wait for 20 secods if you want to cancel the restore otherwise it will go ahead with it.

You can check logs in logs folder & restore file in restore folder which will provide you information about what was restored.

I hope that this process/Script will also assist you when you are in similar situation.

Regards
Sukhija Vikas
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s