Forum Discussion
Mirror VIPs from device to device
Is there a way to replicate a VIP from one device to another, but just modify the VIP through tclsh? Is there a way to export a config file for that VIP on one device modify the IP address and paste it or SCP it to the other device?
5 Replies
- Kevin_Stewart
Employee
Sure.
tmsh list ltm virtual my-vs > myvs.conf tmsh load sys config merge file myvs.confUnderstand of course that the VIP configuration contains references to other objects that may not be on the second device.
- Steven_J__Willi
Nimbostratus
Are you talking about things like certs?
- Kevin_Stewart
Employee
A virtual server configuration could reference various profiles (TCP, HTTP, client and server SSL, pools, iRules, persistence, etc.).
- Steven_J__Willi
Nimbostratus
Ok I get what you are saying, but if one device is prod and the other is BCP/DR then all that should be the same in both environments. It is just painfully long process to do the mirrored config in the gui, ssl profile creation, pool creation, vip creation, etc, etc.
- Michael_Jenkins
Cirrostratus
I've been doing this same thing recently. Been working on some PowerShell scripts to do a lot of the legwork for me, but haven't finished yet...
So far, the easiest way I've found to accomplish this is by using the iRule Editor and grabbing the current config file from both environments, and pulling out the pieces I need (e.g. a specific or multiple virtuals, along with known dependencies that may not exist or be up to date in the DR site). If I don't need all of that, I'll just run tmsh list from putty to get most (if not all) the config data as well.
Then I'll use WinScp to connect to the DR site and create a new file I'll use as the merge config file, and paste the code for the/those virtual(s) in there (and making the necessary modification to them, like ip addresses and what not, and being sure to put the dependencies above the rest).
Then through putty in that folder i run the verify merge command tmsh load sys config verify merge file
If it gives me an error because it couldn't find something, I'll go and grab that from the full config file and add it to the merge doc...
Only think I've had problems with are things that need actual files (e.g. the actual ssl certificates, a bit of APM stuff), which can be added through the GUI.
Once the verify runs without error, I run the merge command Kevin mentioned tmsh load sys config merge file
Hope this helps.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com