engineering:computer_science:windows:server:fileserver:migrate_windows_fileserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
engineering:computer_science:windows:server:fileserver:migrate_windows_fileserver [2024/08/16 13:56] – removed - external edit (Unknown date) 127.0.0.1engineering:computer_science:windows:server:fileserver:migrate_windows_fileserver [2024/08/16 13:56] (current) – ↷ Page moved from refractor_computer_science:windows:server:fileserver:migrate_windows_fileserver to engineering:computer_science:windows:server:fileserver:migrate_windows_fileserver carlossousa
Line 1: Line 1:
 +====== Migrate Windows Fileserver using Robocopy ======
 +
 +Migrate [[:wiki:windows:server:fileserver|Windows Fileserver]] using [[https://en.wikipedia.org/wiki/|Robocopy]]
 +
 +  * In your new server.
 +
 +  - Go to your C:\
 +  - Make a folder called "RoboCopy"
 +  - Inside "RoboCopy" make a new folder called "Logs"
 +  - Inside "RoboCopy" mae a new folder called "Old Logs"
 +
 +  * As filename I usually use the folder / drive I'm migrating.
 +
 +  - Insert the following code into the *.ps1
 +<code>
 +
 +$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
 +
 +</code>
 +
 +**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 **D**ata, **A**ttributes, **T**ime Stamps, **S**ecurity, **O**wner, a**U**diting 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
 +
 +  - After the first run, run the following code to mirror just changes from the old to the new server, usually doing off-work hours.
 +
 +<code>
 +robocopy $source $destination /e /zb /copy:DATSOU /MIR /r:3 /w:3 /log:c:\RoboCopy\Logs\<FOLDER>.log /V /NP
 +
 +</code>
 +
 +  - Afterwords, don't forget to re-share the folder / drive, and change the source on the DFS.
 +