DotW: Loading a Full Configuration through the CLI

DotW: Loading a Full Configuration through the CLI

7822
Created On 09/25/18 19:02 PM - Last Updated 07/18/19 20:12 PM


Resolution

This week the community truly helps the community! Several of our members had questions about the best way to load a large chunk of configuration onto a device via the CLI, and a fellow community member came to the rescue. 

 

Community members 'dan731028', 'carmp3fan' and 'RobSmith' all had ideas and questions but were running into some issues. Let's see if we can provide a workaround.

 

2015-10-26_11-28-43.png

2015-10-26_11-28-24.png

2015-10-26_11-26-48.png

When performing this kind of operation, the easiest way to get a good bearing on the configuration we're about to deploy is to resort to a comfortable text editor that allows us to easily scroll, highlight, and wrangle the multitude of lines into something comprehensible and accurate. Some text editors may add unexpected and invisible line breaks or formatting that could cause issues when importing the configuration. Of course, invisible formatting can result in error messages and some work in finding lines that need to be repaired, so the copy/paste operation will work.

 

For normal administrative operations, the CLI is set to interact with the administrator and provide feedbackit will not correct any commands and will output error messages if a command is incorrect, even if the command itself is accurate but invisible line breaks are present. To allow a long list of set commands to be submitted without worrying about line breaks, enable scripting mode.

 

> set cli scripting-mode on

 

Scripting mode suppresses any special characters used for formatting when accepting input from the CLI and also stops interacting with the administrator's commands (it will no longer try to autocomplete commands). This prevents error messages from appearing, and prevents the entire paste function from failing if one line has incorrect formatting or unsupported characters.

 

Thanks go to jvalentine for providing a quick response to the community!

 

2015-10-26_12-01-23.png

 

 

The original discussions can be accessed here: Increase paste buffer on PAN (or other import methods) , CLI - invalid syntax errors when pasting in config and Bulk upload of set commands in PAN-OS

 

Thanks for reading!

Tom

 

 

 

 



Attachments
Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClT0CAK&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Attachments
Choose Language