Preparing a File to Be Loaded into the Current SRC Configuration
When you save your current configuration to a file, the file contains the configuration in its current form, including any uncommitted changes. If more than one user is modifying the configuration, all changes made by all users are saved.
When you save a configuration to a file, the contents of the current level of the statement hierarchy (and below) are saved, along with the statement hierarchy containing it. When you save a file to XML format, the software inserts a line in the saved file to indicate the level at which the file was saved. For example:
<configuration><system><services sdx:current="true"><ssh><root-login>deny</root-login></ssh><editor><password-encryption>sha</password-encryption></editor></services></system></configuration>The file is saved in the current working directory. When you load a file that was saved at a specific hierarchy level, use the
relative
option for aload
command. If you do not use the relative option, the command disregards thesdx:current="true"
text in XML files.If you plan to copy a configuration file from the C-series Controller to another system and back, make sure that you have SSH or Telnet enabled on the C-series Controller.
The examples in the following procedure show how to prepare a file in XML format; the procedure is the same for files in text format.
To prepare a configuration file for loading into the SRC configuration:
- In configuration mode, navigate to the level at or below which you want to save the configuration.
- Run the
save
command.[edit system]user@host#save systemcfg.xml
172 lines written to systemcfg.xml[edit system]
- Copy the file to a remote system, and then edit it. For example:
user@host>file copy /root/systemcfg.xml ftp://user@myserver/systemcfg.xml
Password:user@host>For information about specifying the filename, see Chapter 5, Using the SRC CLI Operational Commands to Monitor the SRC Software.
- Edit the file in the editor of your choice.
- Copy the edited file back to the C-series Controller. For example:
user@host>file copy ftp://user@myserver/systemcfg.xml /root/systemcfg2.xml
Password:user@host>Related Topics
- For information about enabling SSH and Telnet on the C-series Controller, see SRC-PE Getting Started Guide, Chapter 10, Managing SRC Configurations.