How to output cli hierarchical structure

Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to output cli hierarchical structure

Not applicable

Is there a way to do a dump of the cli hierarchical structure to say a flat file?


L2 Linker

In Unix, you could just capture the output of the configuration display.

% script pan.log

% ssh pa-firewall -l username


> set cli pager off

> set config-output-format set

> show config running


> exit

% exit


Script done, file is pan.log

This will capture the hierarchial configuration and is more readable than the XML configuration.  Unfortunately, it will take some effort to manipulate this into the commands that would be entered at the command line.

L6 Presenter

By default if you are on CLI you can just run 'show config running' and it will output the full configs in hierarchical structure. Log the output and save as a TXT file. Is this what you are looking for? If not then perhaps you could elaborate more.



Not applicable

I was looking at the xml structures, and not sure how to build the xpath.

From the cli, if there was a dump command that could redirect the xml structure to a flat file to be used later.

perhaps you could export the configuration to another server?

scp export configuration from running-config.xml to <username>@<hostname>:<path-to-file>

Any of the named configuration versions can be exported in this fashion.


Not applicable

If you are searching for commands to enter on the cli, you can export the config simply entering:

- set cli pager off <enter>

- set cli config-output-format set <enter>

- configure <enter>

- show <enter>


Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!