ASR VMware-to-Azure: How To cleanup duplicate/stale entries
Symptom
You probably have a decommissioned Protected(Source) server or PS server without proper uninstall of the software, it will create duplicate entries in the Configuration Server database and show up in ASR portal with no heartbeat updates.
Resolution
Please perform the below steps on the Config Server(CS) to cleanup the stale entries.
1. Determine the stale entry that you want to cleanup
i.e a Source/PS/MT and its IP address
- Open mysql cmdline in administrator mode
- Run command
mysql> use svsdb1;
mysql> select id as hostid, name, ipaddress, ostype as operatingsystem, from_unixtime(lasthostupdatetime) as heartbeat from hosts where name!='InMageProfiler'\G;
- This will show you the list of registered machines along with their ip address and last heart beat.
Find the host which is showing replication stuck problem and check whether that host has two host ide entries in which one should be stale with older heartbeat.
2. Elevated prompt
Now go to "C:\home\svsystems\bin" path in an elevated CMD prompt ( Drive letter will differ depending upon the installation path provided)
3. Use the stale entry that you want to cleanup i.e a Source/PS/MT and its IP address
Syntax: Unregister-ASRComponent.pl -IPAddress <IP_ADDRESS_OF_MACHINE_TO_UNREGISTER> -Component <Source/ PS / MT>
for eg: If you have a OLD source server entry "OnPrem-VM01" with ipaddress of 10.0.0.4 then the command would be as below
perl Unregister-ASRComponent.pl -IPAddress 10.0.0.4 -Component Source
4. uninstall the mobility agent
Once its done uninstall the mobility agent on the source machine and enable the protection again on the portal
Note: Please note that running this on a Actively replicating Source or MT would remove replication configurations.