Re-IP Rule on Linux VM: Best Solution in Veeam Backup and Replication 7.x Version and Newer
Veeam Backup & Replication is one of the best backup and replication software that you can use them in your virtual environment. The replication software be able to IP customization during disaster-recovery, and you can have your virtual machines in a DR site with different IP plan. But it just supports Windows VMs for IP customization or “Re-IP Rule”. So, what can we do about Linux virtual machines and others?
There is one unique answer (As I know):
You have to do it manually or by a script during replica machine boot process.
I wrote two scripts on this regard and you can customize them and put one of them on your machine “/etc/rc.d/rc.local” and the script will run as a startup script.
don’t forget make them executable: “chmod +x \path\to\script”
Re-IP – First Script
The first script will update your “ifcfg” file and restart network service:
Re-IP – Second Script
The second script doesn’t touch your “ifcfg” files and just add IP and route to your network connection:
Don’t forget add your IP addresses, default gateways and mask in the variables section and replace them with your IP plan.
Update: Don’t forget make rc.local executable by this command-line: sudo chmod +x /etc/rc.d/rc.local
Update (09/07/2018)
New sample of script will replace disaster IP range in some files such as “/etc/hosts”, “/etc/fstab” and other files and do some action according to OS version, you can customize the script as well:
Further Reading
Veeam Backup and Replication – How to Choose Best Transport Mode for vSphere Proxy?
I/O Block Size (> 3 MB) Best Practice on EMC AFA/HFA and Linux (Physical and Virtual)
Download and Install Windows Updates Remotely via PSWindowsUpdate PowerShell Module
NFS Client Configuration For My Dummy Colleagues
Hi Davoud,
The script keep giving same error that the primary gateway and the replica gateway is not reachable while the replica gw is reachable
Hi Sean,
You are talking about “Example 3”, I changed something and there is no error now.
Please change all IP ranges to what you want and then run the script.
The previous script has been removed.