Veeam Backup & Replication – Re-IP Rule on Linux VM
Veeam Backup & Replication is one of the best backup and replication software that you can use them in your virtual environment. Veeam BR be able to IP customization during disaster-recovery and you can have your virtual machines in a DR site with different IP plan. But Veeam BR just support 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”
The first script will update your “ifcfg” file and restart network service:
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
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: