engineering:computer_science:windows:server:fileserver:migrate_windows_fileserver

Migrate Windows Fileserver using Robocopy

Migrate Windows Fileserver using Robocopy

  • In your new server.
  1. Go to your C:\
  2. Make a folder called “RoboCopy”
  3. Inside “RoboCopy” make a new folder called “Logs”
  4. Inside “RoboCopy” mae a new folder called “Old Logs”
  • As filename I usually use the folder / drive I'm migrating.
  1. Insert the following code into the *.ps1
$source = <\\OLDSERVER\d$\FOLDER>
$destination = <D:\FOLDER>

robocopy $source $destination /e /zb /copy:DATSOU /r:3 /w:3 /log:c:\RoboCopy\Logs\<FOLDER>.log /V /NP

What are those switches doing?

  • /E Copy subdirectories recursively, (including empty ones.)
  • /ZB Use ‘restartable’ mode, and if this fails use ‘backup’ mode.
  • /copy:DATSOU Copy Data, Attributes, Time Stamps, Security, Owner, aUditing information
  • /R:3 Retry three times, if you don’t specify this, it will retry one million times!
  • /W:3 Wait time between the retries above.
  • /log Will output the log to the folder we created above.
  • /V Produce output in verbose (detailed) mode.
  • /NP Do not show percentage progress
  1. After the first run, run the following code to mirror just changes from the old to the new server, usually doing off-work hours.
robocopy $source $destination /e /zb /copy:DATSOU /MIR /r:3 /w:3 /log:c:\RoboCopy\Logs\<FOLDER>.log /V /NP
  1. Afterwords, don't forget to re-share the folder / drive, and change the source on the DFS.
  • engineering/computer_science/windows/server/fileserver/migrate_windows_fileserver.txt
  • Last modified: 2024/08/16 13:56
  • by carlossousa