Add the master replica, using the same replica ID.
See Enabling Replication on a Master Replica.
Recreate the replication agreements from that master to the other
replicas in the topology.
Initialize the new master.
If you were able to back up the master, initialize the master
from this backup.
If you were not able to back up the master (in the event of a
machine crash), initialize the master from another master in the topology.