How to Multiple IPs for one server to switch it in case of DoS / DDoS?

I am new to Blockchain. I will run a server to secure a blockchain network (many servers with exposed IPs - no domains!). There will be only SSH, Fail2Ban, UFW, MONIT and the needed blockchain-client running on the server. Nothing more. Now I am thinking about a (D)DoS-attack that most likely will hit my IP one day.

To block this attack is one thing, but I want to provide the best uptime for my blockchain-client as possible. So I am thinking about two options: Switching off the attacked server and turn on a backup server NOR buying some more IPs for my server and just switch the IP.

It would be cheaper if the “IP-switch” would work in this scenario than to rent one or two backup servers. But I never did this and have never faced (D)DoS, so my experience level is very low.

What’s your opinion? Would the “IP-switch” work?

Edit
Additional thoughts: Will attackers attack an IP itself or are they attacking the IP:PORT? So, the question is, might it be possible just to change the port of the blockchain-client and close the attacked port? Or can an attacker do (D)DoS also on any other open port, like SSH (if the attacker does a portscan and finds the correct SSH port)?

Thanks & Regards
camillelola