How do you change a server name

I recently added a new server, I’d like to keep the old server as a backup server; since they are mirrors; I just do a backup and restore; but the server names need to be changed in the DNS and I don’t see a way to do this automatically or manually, without having to edit each DNS record individually. I searched the documents and didn’t find this issue; can you tell me how to change the server name in the DNS records globally?