Forum Discussion
bulk edit data-group (bigip.conf )
- Oct 12, 2016
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:
Why can you not move it to an external data group? They are functionally the same and the load is atomic.
In any case, if you simply want to add and delete records, you can do it in a regular
tmsh
command, as in
tmsh modify ltm data-group internal my-dg records \
add { record4 { data def } record5 { data ghi } record6 { data mno } } \
records delete { record1 record2 record3 }
If you want to replace the entire data group all at once, you can use a
load...merge
:
cat > /var/tmp/new-dg-def.txt << EOF
ltm data-group internal my-dg {
records {
record1 {
data def
}
record2 {
data ghi
}
record3 {
data there
}
}
type string
}
EOF
tmsh load sys config /var/tmp/new-dg-def.txt merge
The last command is the important part. The rest is just to demonstrate what the file contents must be. It is !!! IMPERATIVE !!! that you include the
merge
keyword. If you forget, you will potentially blow away your entire config.
This
load
will validate the syntax before attempting to add, so if there is an error in the source file, it won't replace the data-group.tmsh load sys config ~/uaredirects.txt verify Syntax Error: "/home/me/uaredirects" unknown property
How do I get around the syntax error?
Here's what my file looks like:
~ cat uaredirects.txt
ltm data-group internal class_requestDirectorKV { records { _SourceURL { data "Type;Directive;Location;Implementation Date Ticket Number;Start Date;End Date" } ua.mywebsite.com/redirect2 { data "=;302; 123;2016-10-12;2016-12-12" } } type string }
Thank you guys for the help!
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