Forum Discussion

Alvin_Ng's avatar
Alvin_Ng
Icon for Altostratus rankAltostratus
Jun 28, 2022
Solved

Possible to Compare and Diff configuration by ucs files

Hi,  I have some configuration change on LTM, and do the ucs backup before and after also. But I don't hope to compare those ucs files to find the different by download those archives and open anoth...
  • Dario_Garrido's avatar
    Dario_Garrido
    Jun 29, 2022

    Hello Alvin Ng,

    There are another methods to compare configs, but they are more rudimentary.

    1. Compare SCF files using TMSH

    # Extract intial config
    tmsh save sys config file /shared/tmp/initial_config.scf no-passphrase
    # Extract final config
    tmsh save sys config file /shared/tmp/final_config.scf no-passphrase
    # Compare both files
    tmsh show sys config-diff /shared/tmp/initial_config.scf /shared/tmp/final_config.scf | egrep -e "\s{3}\|\s{3}" -e "[<]$" -e "^\s*[>]"
    

    2. Similar to the previous command, you can use diff to compare both bigip.conf files

    # First, extract the bigip.conf file from both UCS
    # Compare both files
    diff /shared/tmp/initial_bigip.conf /shared/tmp/final_bigip.conf | egrep -e "\s{3}\|\s{3}" -e "[<]$" -e "^\s*[>]"
    

    3. You can also use Notepad++ to compare them, from my experience, better compare feature than diff.

    Hope this helps.