Forum Discussion
Listing a complete config with partitions TMSH
I am trying to use Solarwinds NCM to backup my configuration, and have successfully backed up the Common partition with the TMSH command "tmsh -q show running-config" However i also need all the config from the partitions, is there a way to get the whole config at once?
6 Replies
- JRahm
Admin
Hmm, I'll need to dig on that one. However, you can for now do by partition:
tmsh -c "cd /partition1;list" tmsh -c "cd /partition2;list" - JRahm
Admin
Also, you can run a tmsh script to show the config in all the partitions, though it shows the full config for each partition, not just the partition specific stuff. Give this a try while I track down your original request.
proc script::run {} { foreach x [tmsh::get_config auth partition] { set current_partition "/[lindex [split $x " "] 2]" tmsh::cd $current_partition append all_config [tmsh::show running-config ltm one-line non-default-properties] puts "" puts " $current_partition " puts "" puts " " puts $all_config puts " " } } - JRahm
Admin
with the advent of the folders structure, this is not possible with a single command. You'll need to switch into each partition to get a listing. Best option to get the entire config is to use tmsh save sys config file /var/tmp/myconfig.txt and then another command to read it. if you would like, you could create a support case for and RFE for this behavior, something like tmsh list config all-partitions
- uni
Altocumulus
"tmsh -c "cd /;list recursiveYou don't get virtual address configuration with the
command (and of course you don't get ASM and PSM config).listAnother option is to use
and the browse the file with "less"tmsh save sys config file - LaoLee_181138
Nimbostratus
My device is VE 11.5.1. I can use below way get all the partition config:
move to the / folder 1. cd / 2. show running-config rescursive
Then, you can got all the config with all the partition with '/partition' in the config files..
- StephanManthey
Nacreous
Hi,
just had a similar issue and used the following syntax to look for and list:-
configured folders:
tmsh -q -c "list sys folder recursive one-line" | awk '{print $3}' -
imported iFiles:
tmsh -q -c "list sys file ifile recursive one-line" | awk '{print $4}' -
referenced iFiles:
tmsh -q -c "list ltm recursive one-line" | awk '/^ltm ifile/ {print $3}'
The options "recursive" and "one-line" are not available in all configuration contexts.
Thats why I used a "global" recursive listing in ltm context to check the referenced iFiles by applying a filter in awk. Thanks, Stephan -
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