bulk edit data-group (bigip.conf )
I've seen some answers to this but I'm needing to make sure it's the right answer. We have a data-group key/value pair for redirects. We put in the source, destination, and other details, like start and end date so we don't have to edit the irule every time a new redirect is requested.
We are requested to do hundreds of redirects and want to avoid manually updating the data-group one at a time. I understand it is technically possible to edit the bigip.conf directly (soft reboot of the LTM, risk of syntax errors, spaces out of place, etc.). Regardless, we would like to know how to make edits and additions to a text file, then merge them into the section of the conf that has our data group.
I know how to find our data-group with this command: tmsh list ltm data-group internal name_of_redirect_data_group then I output that into a file >redirects (should this file rename extension-less?) So now I can edit that file with the additions and modifications.
This is where I'm confused. Some say I now do this: tmsh load /sys config file ~/redirects merge Another answer said: tmsh load /sys config merge file ~/redirects
But I want to use the verify command first to check syntax. And, I'm not sure the load /sys config is the right thing I want. How does it know where in the bigip.conf file to merge the changes to?
Why can't I edit the bigip.conf in vi, save changes in vi, save sys config, then load sys config? When I try that in my test environment the system reloads but my vi changes don't take effect. Thank you for helping me figure this out.
Also, we're on BIG-IP 12.1.1 Build 1.0.196 Hotfix HF1
There is no need to do this. There are two data-group sources: internal (meaning, part of the config) and external (meaning loaded from a separate file when the config is reloaded). They are equivalent in performance; they differ only in how they are loaded (well, and the differ in layout, as well). This article explains how to create and modify an external data-group: