Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

robocopy - complete job move to the next (stack jobs) is it possible?


Recommended Posts

Posted

Moving home folders to the new server and is it possible to stack robocopy jobs in one script? The usernames have changed in the new structure so is it possible to do robocopy "\\oldserver\user1" "\\newserver\newuser1" /e and then underneath robocopy "\\oldserver\user2" "\\newserver\newuser2" \e

 

Could i create a batch script to get this to work?

Posted
Yes I do it all the time for a quick user backup scripts. I stack things like Desktop, Documents etc.

 

Was my way correct then or not? Any chance you could give me an example. Also can I get an output file if anything doesn’t transfer.

Posted

Just create a batch file and put each command on each line

 

EG:

 

robocopy "C:\source1" "C:\dest1" /MIR

robocopy "C:\source2" "C:\dest2" /MIR

robocopy "C:\source3" "C:\dest3" /MIR

robocopy "C:\source4" "C:\dest4" /MIR

  • Thanks 1
Posted
Just create a batch file and put each command on each line

 

EG:

 

robocopy "C:\source1" "C:\dest1" /MIR

robocopy "C:\source2" "C:\dest2" /MIR

robocopy "C:\source3" "C:\dest3" /MIR

robocopy "C:\source4" "C:\dest4" /MIR

 

Would you use /mir or /e? All i want is the files and folders i don't want any permissions etc.

Posted

I would use /MIR

 

If you want the time stamps as well you can use /copy:t and /dcopy:"t

 

eg:

 

Robocopy "C:\source1" "C:\dest1" /MIR /copy:dat /dcopy:dat

Posted

I normally use /s /e but I think that is redundant.

/mir is good too.

 

If your copping for the first time there won't be anything to delete.

/mir will delete files at the destination that are not in source.

 

So getting user directories in sync to a new server /mir is good.

If its backing things up I'd use the /e so your not deleting anything from the backup.

/copyall will get all the file info including acls which you may want since it is user directories.

 

If you want output to a file add /log

 

I usually set the number of threads, retries and timeout as well.

https://technet.microsoft.com/en-us/library/cc733145(v=ws.11).aspx

Posted

Does this look alright or would anyone do anything different?

 

robocopy "\\oldserver\user1" "\\newserver\newuser1" /MIR /copy:dat /dcopy:dat /log

 

Would you limit how many i home folders i should do at a time?

Posted
Does this look alright or would anyone do anything different?

 

robocopy "\\oldserver\user1" "\\newserver\newuser1" /MIR /copy:dat /dcopy:dat /log

 

Would you limit how many i home folders i should do at a time?

 

If you use /MIR I could copy everything all at once as an initial copy. When you're ready to switch over run it again to copy the differences.

Posted
If you use /MIR I could copy everything all at once as an initial copy. When you're ready to switch over run it again to copy the differences.

 

Will the logs show clearly what has not copied?

Posted
Thanks for this it worked perfectly! All Years are now done so would you recommend me just running them again just in case?

Was anyone accessing the old path while the copy was going on?

Do the logs report any errors?

 

If yes to either, make sure the users are using the new path and run again to catch any changes they made on the old share after the copy process started.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...