Very useful should you need to replace a production server instantly.
Limitations: This needs to be within the same datacentre
Note: Have your firewall disabled on both servers prior
To start, we login to the Linode Manager.
Firstly, click Production. Head over to Networking.
Take note of IPV4 Information as listed below:
Gain root access (on both servers)
Remember: the details you enter on Production, are the details listed on Example.
Head over to Networking on Production and have the details ready.
Scroll down to IP Transfer. Click Save.
On Example - Run: ifconfig
[email protected]:~# ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet IPV4 netmask 255.255.255.0 broadcast BROADCAST inet6 REDACTED prefixlen 64 scopeid 0x20<link> inet6 REDACTED prefixlen 64 scopeid 0x0<global> ether REDACTED txqueuelen 1000 (Ethernet) RX packets 40999 bytes 23149496 (23.1 MB) RX errors 0 dropped 1 overruns 0 frame 0 TX packets 38364 bytes 5080534 (5.0 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
On Production - Execute IPSwap:
ip addr flush dev eth0 ip link set eth0 up ip addr add IPV4_EXAMPLE/24 broadcast BROADCAST_FROM_EXAMPLE dev eth0 ip route add default via GATEWAY_FROM_MANAGER
Remove all IPv4 addresses, enable network interfaces.
Configure the new IP address and broadcast.
Route traffic through this IP address and gateway.
To run this as one command use the example below:
Don't forget to reverse this command on Example (to be able access the old production server)
You will now be able to access your servers in reverse order.