Cisco Systems Cisco IOS XR manual Saving the Target Configuration to a File

Models: Cisco IOS XR

1 222
Download 222 pages 13.32 Kb
Page 119
Image 119

Chapter 4 Configuring General Router Features

Managing Configuration Sessions

Saving the Target Configuration to a File

Target configurations can be saved to a separate file without committing them to the running configuration. Target configuration files can then be loaded at a later time and further modified or committed.

To save the configuration changes in the target configuration to a file, enter the save configuration device: command. Replace the device argument with the name of the device on which you want to store the file (for example, disk0). After you enter this command, the router prompts you to enter a filename. If you enter only a filename, the file is stored in the root directory of the device. To store the file in a directory, enter the directory path and filename when prompted. We recommend that you specify the cfg file extension for easy identification. This suffix is not required, but it can help locate target configuration files. Example: myconfig.cfg

In the following example, a target configuration file is saved to the usr/cisco directory of disk0:

RP/0/RP1/CPU0:router(admin-config)# save configuration disk0:

Destination file name (control-c to abort): [/running-config]?/usr/cisco/test.cfg Building configuration.

1 lines built in 1 second [OK]

Note You can also save a configuration to a file using the show configuration file filename command.

Loading the Target Configuration from a File

To populate the target configuration with the contents of a previously saved configuration file, go to global configuration or administration configuration mode and Enter the load filename command. Consider the following when entering the filename argument:

The filename argument specifies the configuration file to be loaded into the target configuration.

If the full path of the file is not specified, the router attempts to load the file from the root directory on the device.

In the following example, a target configuration file is loaded into the current configuration session. The current configuration session is therefore populated with the contents of the file:

RP/0/RP1/CPU0:router(config)# load disk0:/usr/cisco/test.cfg

Loading.

77 bytes parsed in 1 sec (76)bytes/sec

Loading an Alternative Configuration at System Startup

When a router is reset or powered on, the last running configuration is loaded and used to operate the router.

You can load an alternative configuration during system boot. See Cisco IOS XR ROM Monitor Guide for information and instructions on this process.

 

 

Cisco IOS XR Getting Started Guide

 

 

 

 

 

 

OL-10957-02

 

 

4-33

 

 

 

 

 

Page 119
Image 119
Cisco Systems Cisco IOS XR manual Saving the Target Configuration to a File, Loading the Target Configuration from a File