One of the Best tool for Migration - Robocopy

We all know or heard about the Robocopy being an amazing tool during migration or copying data. In this post i just want to talk about few of the Flags of Robocopy that i have used couple of times as per the situation. We have used Robocopy to migrate File share or during differential Run or so many other aspects where Robocopy is a life savior.

Now without wasting time below is the simplest command ever :

Open command prompt in Administrator and type below command :

robocopy <source> <Destination>  /Mir

now just like /Mir there are so many flags that we use /Mir would mirror source and destination. That means if something there on destination but not present on the source in that case it would erase it as well so be cautious before using it.


Now if there is a scenario where you need to copy the permissions as well along with the data in that case we use /Sec flag as shown below :

robocopy <source> <Destination>  /Mir  /Sec


Now sometimes what happened your robocopy get stuck either because you dont have permission on the particular files or that file cant be copy stuck or in use. In that scenario rather wasting time on re-tries use w:0 and r:0 flag to skip if unable to copy due to any reason.


robocopy <source> <Destination>  /Mir  /Sec  /w:0  /r:0


Now if you want the logs of the Robocopy run so that if something goes wrong you can check there. You need to provide the log flag along with the location of the logs and if you want status on console window as well as on log then use /Tee flag

robocopy <source> <Destination>  /Mir  /Sec  /w:0  /r:0  /log:c:\Logs\xyz.log  /tee


Now the situation is you need to exclude some directory then you can use /XD flag and this would help you alot because in most cases you will find backup folders which are keep on updating or any folders like that , you should exclude else robocopy would stuck in loop. Happened with me where source was 3TB but robocopy copied 3.5TB and still running - after digging deep we found the snapshot folder which was keep on updating or changing.
  

 robocopy <source> <Destination>  /Mir  /Sec  /w:0  /r:0  /log:c:\Logs\xyz.log  /tee   /XD “\\xyz\abc\~snapshot


As per migration respective, i have discussed few flags and commands of robocopy however if you have a different requirement then you can dig here 



https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy



Migration to Cloud - CutOver Steps - Overview


Its been a while I am doing Migration scoping and planning along with Cloud implementation designing and deployment. While performing migrations the important and crucial part is the cut-over so here I consolidated steps for Cut-over.



Scenario := what I assumed here is Web servers running on the VMware or on-prem and we have to migrate machines to Azure or any other cloud. Using ASR or any block or image level replication tool like RiverMeadow etc.



Design – As per my scenario we are keeping the existing Domain and migrating application and DB’s on Cloud. Below are Steps you need to keep in consideration -



  • Extended the Domain to the Azure VM.
  • Set up the Replication infrastructure like for ASR we deploy Config server or Master target server and incase of other Tools like RiverMeadow we deploy Cloud appliance. This step is depend what tool are you using to perform replication.

  • Replicate the VMs to the Cloud and using NSG to stop the communication with AD.
  • Once Replicated – Changed the name and remove from the domain.
  • Restart the VM and add to the Domain after allowing communication to the AD.
  • For DB – I assume we are using the PaaS SQL and used DMA for migration.
  • Now once everything is migrated to Azure or we call it Initial Sync then We provide infrastructure to Customer for modification on IIS or any other configuration as Ips going to change etc .
  • Once we have the go ahead we will plan for the Cut-Over.




Cut-Over : This is the Time where we would divert the application URL to point to the Azure VM rather on-prem and Shutdown the On-prem once Test is successful.


  • As soon as initial sync is done and all are configured on Azure VM. Infrastructure is provided to the customer.
  • Customer then tests the applications, accessing the servers from those public IPs. (As per the reequipment here we are taking the ex. Of Public website).
  • Once tested, We get the go ahead for the Cut-over Date and time.
  • Customer lowers the DNS TTL for the public domain names to 5 minutes. This happens one day prior to cutover. 
  • At cutover time, Differential needs to run and Testing needs to perform again (Downtime). Once tested.
  • Customers changes the DNS records for the public domain names to resolve to the public IP addresses of the new servers. 
  • Customer retests the applications. 
  • Once tested, We will open the firewall on port 443 to each of the new public IPs, allowing access from all addresses. As for now only testers allowed to access application over 443.



Now once all start working as expected – there are few steps needs to wrap up the task.

 Moves the FSMO roles to the Azure VM holding windows AD.

 Removes the AD role and shut-down the VM and other on-prem servers gracefully.


MS Defenders

 Microsoft Defender offers a wide range of security solutions, similar to the ones we've discussed (Defender for Containers, Defender fo...