How to output cli hierarchical structure

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

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?

5 REPLIES 5

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

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.

Retired Member
Not applicable

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.

Regards

-Richard

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.

-Benjamin

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>

Regards

  • 3493 Views
  • 5 replies
  • 0 Likes
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!