Avatar of rookie_b
rookie_b
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Need help migrating between servers while changing some of the permissions

We are migrating some data and would like to change some of the groups, while preserving the rest of the permissions. What is the best approach to do that? At the moment I am thinking something along the lines of

set the permissions manually at the top level - easy

use robocopy to copy only the contents without affecting the  level folder - basically run it at "\\server\folder\subfolder" level - not ideal as I'd have to copy any files at  "\\server\folder\" level separately, and sometimes there are loads for subfolders, so plenty of robocopy instances.

run some sort of a script to get a list of subfolders where due to blocked inheritance the old group still exists and has been copied across by robocopy. maybe some get-acl/set-acl script that finds a group, removes it and adds a separate group in its place.

finally run some script to get a list of files that have manually - not likely but if it is possible, so someone would have done it.


There is a lot of data, so I am trying to use inheritance to do most of the work, and then just mop up the instances of blocked inherritance, rather than run some script against every single file.
PowershellWindows OSWindows Server 2012Windows Server 2008Windows Server 2003

Avatar of undefined
Last Comment
NVIT

8/22/2022 - Mon
Pete Long

Set permissions at the folder level on the DESTINATION, then copy the files WITHOUT their ACLs

</P>
rookie_b

ASKER
Hi Pete,

Thanks for you r fast response. I would still have to find a way to set permissions  for sub folders further down in the file structure that have permissions set manually. How would I do that?

I suppose if I could find a way to identify the folders with custom permissions (any non-inherited anywhere in the file structure), and then copy just those with ACLs,ly. How wouldo that? Perhaps some powershell script to get all folders that have one or more non-inherited permissions, copy those, and then amend the permissions somehow. How can I do that?

Thanks!
ASKER CERTIFIED SOLUTION
NVIT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
rookie_b

ASKER
Very helpful. Thank you!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
NVIT

You're welcome. I'm glad it worked out for you. Have a good one. Don't work too hard!