Please tell me how to switch automatically when the master server is stopped and switched to the backup server

Please tell me how to switch automatically when the master server is stopped and switched to the backup server.

There's no "how". That's how it works when it is working correctly. If, before the master stopped, the backup did not show connected and synchronized, then it wasn't working correctly.

What condition are you in now? If this is urgent, you should call support.

In "web view", there is no automatic connection from the master server to the backup server, and I need to reconnect to the backup server.

Please tell me how to automatically switch from "web view".

If you mean Perspective, then failover should happen automatically if redundancy is properly configured:
https://docs.inductiveautomation.com/display/DOC81/Ignition+Redundancy#IgnitionRedundancy-PerspectiveSessions

If "web view" means "the gateway web UI", then there is no way for redundancy to work.