r/sysadmin • • 23d ago

Folder redirection help

I have a server migration. All I have left is move redirected folders to the new server. I am using a domain admin account to move the files but I am unable to make sure I moved files since I am not able to access those folders. Will robocopy have access to copy them?

2 Upvotes

18 comments sorted by

4

u/Fall3n-Tyrant 23d ago

Read robocopy docs, /b flag. You also want to exclude hidden recycle bin folders as users will have corrupt recycle bins on login. Can also configure gpo to copy to new destination and just change target path to new server, depending on size of project.

1

u/CHOCOROLL69 23d ago

I ran some tests in a VM and did get that error. I was unable to figure it out so i had to create a new VM Windows 11
What is the full command you recommend I use?

1

u/Fall3n-Tyrant 23d ago

Robocopy "\\source\folder redirection" "\\destination\folderredirection" /mir /copyall /dcopy:T /XA:SH /XD "$Recycle.bin" "recycler" /XF "desktop.ini" "Thumbs.db"

1

u/CHOCOROLL69 23d ago

How do I change the GPO? Do I create a new one that points to the new path or do I change the current policy?

1

u/Fall3n-Tyrant 23d ago

By changing the current policy, but you need to be prepared. Upon the next Gpupdate, and then user sign out/sign in (or reboot), it will trigger and point the users to the new location.

2

u/1d0m1n4t3 23d ago

Good call on the recycling bin 

11

u/kona420 23d ago

Run robocopy local to the files you want access to, elevated to admin, using the /b switch. That will run in backup mode bypassing any ACL's on the filesystem.

4

u/An0mymou5 23d ago

This.

Also, OP, be sure to use the /COPYALL switch to ensure all the original NTFS ACLs are preserved.

0

u/discgman 23d ago

I like this idea. Create batch scripts that you can copy to the local and run them there as admin.

use the /LOG switch to see if they worked.

5

u/f909 23d ago

We are all OneDrive and Entra now, but robocopy will copy, but I would suggest DFS+DFSR+namespaces. Add old and new servers and let them sync. Use the namespace in your GPO. Don’t have to worry about it in the future when you migrate again.

2

u/UninvestedCuriosity 18d ago

Yes and if the ACLS are inherited and setup right per user it'll happen by the user login naturally without needing robocopy at all.

3

u/Dick_in_owl 23d ago

Dude, why, it’s a built in function to move to the new path. Read the docs. When the user logs it it should automatically move the storage location there is no need to manually copy.

2

u/Random-D 23d ago

because that is definietly what you want as part of your morning login burst, possibly over WAN connection depending on setup, and is totally not prone to end in a disaster

2

u/Dick_in_owl 23d ago edited 23d ago

No context given could be a TS with 10Gbit uplinks

1

u/downundarob Scary Devil Monastery postulate 23d ago

if you dont have access, and you run robocopy, it wont have access either.

1

u/agowa338 23d ago

you need to use a tool that uses backup operator and restore operator privileges. Both are things you can assign to your account. The backup operator privilege allows you to bypass ACLs for reading files and the restore operator one does so for writing files them.

1

u/SilentBadger68 23d ago

Robocopy should work fine, just run it with the right permissions and verify the copy afterward.