Performing a replica failover/failback