Shadow_Walker Posted October 11, 2017 Posted October 11, 2017 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?
ADMaster Posted October 11, 2017 Posted October 11, 2017 Yes I do it all the time for a quick user backup scripts. I stack things like Desktop, Documents etc. 1
Shadow_Walker Posted October 11, 2017 Author Posted October 11, 2017 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.
FN-GM Posted October 11, 2017 Posted October 11, 2017 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 1
Shadow_Walker Posted October 11, 2017 Author Posted October 11, 2017 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.
FN-GM Posted October 11, 2017 Posted October 11, 2017 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
ADMaster Posted October 11, 2017 Posted October 11, 2017 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
Shadow_Walker Posted October 11, 2017 Author Posted October 11, 2017 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?
Edu-IT Posted October 11, 2017 Posted October 11, 2017 I’d suggest doing it in smaller batches just for ease of management.
Shadow_Walker Posted October 11, 2017 Author Posted October 11, 2017 I’d suggest doing it in smaller batches just for ease of management. 1 at a time?
FN-GM Posted October 11, 2017 Posted October 11, 2017 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.
Shadow_Walker Posted October 11, 2017 Author Posted October 11, 2017 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?
Shadow_Walker Posted October 13, 2017 Author Posted October 13, 2017 Yep, certainly will. Thanks for this it worked perfectly! All Years are now done so would you recommend me just running them again just in case?
ADMaster Posted October 13, 2017 Posted October 13, 2017 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now