Updating the SRC Configuration
You can update the SRC configuration to include configuration changes from a file or to revert to the configuration supplied with the SRC product. You can also retain the active configuration and discard changes not yet committed. After you load one of these configurations, you can commit it to activate the configuration on the C-series Controller, or you can edit the configuration interactively using the CLI and commit it at a later time.
Before You Load a Configuration
Before you load a configuration, make a copy of the current configuration. This configuration contains the active configuration plus any configuration changes that have been made at the CLI. For information about the syntax in the files, see:
- Text format—SRC-PE CLI Command Reference, Volume 1 and SRC-PE CLI Command Reference, Volume 2
- XML format—SRC-PE XML API Configuration Reference
You can save the configuration to text or XML format. By default, the configuration is saved to a file in XML format.
To make a backup copy of the configuration:
- From the [edit] hierarchy level of configuration mode, save the configuration to XML format. For example:
[edit]user@host>save backupcfg.xml format xml
From the [edit] hierarchy level of configuration mode, save the configuration to text format. For example: [edit]user@host>save backupcfg.txt format text
Commands to Load a Configuration
You can use the following commands in configuration mode to make configuration changes:
load factory-default—
Replace the existing configuration with the configuration supplied with the SRC software.load merge
filename
<relative>—
Combine the configuration that is currently shown in the CLI and the configuration in the specified file.load override
filename
—
Discard the entire configuration that is currently shown in the CLI, and load the entire configuration in the specified file.load replace
filename
<relative>—
Look for replace attributes in the specified file, delete the existing statements of the same name, and replace them with the configuration in the specified file.load set
filename
<relative>—
Execute configuration mode commands such asset, edit
,
exit
,and
top
from a text file.The relative option for the
load merge
,load replace
, andload set
commands lets you load the configuration at a specified hierarchy level.The
load merge
,load override
, andload replace
commands let you update configuration statements in the SRC configuration from a text file or an XML file. The structure of this file must conform to the structure for an SRC configuration file. For this reason, we recommend that you copy the file based on the file format you plan to use:
- XML format—Save a configuration to an XML file and modify that file.
- Text format—Save a configuration to a text file, or copy the output from a
show
command to a file, and modify that file.For a merge or replace operation, you can save a copy of the configuration at any level in the configuration hierarchy, then load the updated configuration at the same level.
Use the editor of your choice to modify a saved configuration file. When you edit a file that is to be loaded into the SRC configuration, you can add specified attributes to specify actions to be taken.
Attributes in SRC Configuration Files
You can add the following attributes to text files or to XML tags in a configuration file to be loaded through the
load merge
,load override
, andload replace
commands. If you do not add any attributes, the software merges all changes.If you try to create a configuration object that already exists, the software does not create the new objects and generates an error message to that effect.
operation="delete"
—Delete the specified configuration.operation="merge"
—Merge the specified configuration.operation="replace"
—Replace a specified configuration with another defined configuration.If the
replace
attribute is in the file whose contents are merged, the command disregards thereplace
attribute.