For high availability, you should already have a 2nd tezos-node running and sync'd with the network. If you need to move baking operations to the backup server, best is to copy the ~/.tezos-client/ directory from server A to server B. Then you can start the baker/endorser on server B.
You will be punished HARD if you double bake or double endorse so make ...
You can use the following RPC to check the status:
For that step you'll need to edit the content of the two file mentioned, replacing <proto> in the name with the protocol you intend to use, and setting the alias(es) to the BAKER_ACCOUNT and ENDORSER_ACCOUNT options in them.
For example (at the time of writing, Ubuntu packages version 9.0-1), if you are using edo2net and the alias for your baker ...