Forum Discussion

Jason_130176's avatar
Jason_130176
Icon for Nimbostratus rankNimbostratus
Jan 07, 2014

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

  • 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"
    
  • 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 " "
        }
    }
    
  • 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's avatar
    uni
    Icon for Altostratus rankAltostratus

    tmsh -c "cd /;list recursive
    "

    You don't get virtual address configuration with the

    list
    command (and of course you don't get ASM and PSM config).

    Another option is to use

    tmsh save sys config file
    and the browse the file with "less"

  • 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..

     

  • 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