import running-config

To import the running configuration to a switch profile, use the import running-config command.

import running-config [exclude interface ethernet]

Syntax Description

exclude

(Optional) Specifies the configurations to exclude while importing the current running configuration to a switch profile.

interface

(Optional) Specifies that interface configurations be excluded during the import operation.

ethernet

(Optional) Specifies that all Ethernet interface configurations be excluded from the running configuration during the import operation.


Command Default

None

Command Modes

Switch profile configuration mode

Command History

Release
Modification

5.0(2)N1(1)

This command was introduced.

5.0(2)N2(1)

The exclude interface ethernet keywords were added.


Usage Guidelines

The import running-config exclude interface ethernet command discards all physical interface commands in the running configuration during the import operation.

When no option is specified with the import command, an empty switch profile is created. You can then selectively add the configuration that is needed to be synchronized with the peer switch.

You can import a switch profile based on the set of commands that you want to import. The following three ways can be used to import commands that were added using the configuration terminal mode:

1. Add selected commands to the switch profile.

2. Add supported commands that were specified for an interface.

3. Add supported system-level commands.

When you import commands to a switch profile, the switch profile buffer must be empty.

Use the commit command to complete the import process and move the configuration into the switch profile. Because configuration changes are not supported during the import process, if new commands are added before entering the commit command, the switch profile remains unsaved and the switch remains in the switch profile import mode (config-sync-sp-import). You can remove the added commands or use the abort command to stop the import. Unsaved configurations are lost if the process is aborted. New commands can be added to the switch profile after the import is complete.

Examples

This example shows how to import the running configuration to a switch profile named s5010 on switch 1 of the peer:

switch# config sync 
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config-sync)# switch-profile s5010 
Switch-Profile started, Profile ID is 1
switch(config-sync-sp)# show switch-profile buffer 

switch-profile  : s5010
----------------------------------------------------------
Seq-no  Command
----------------------------------------------------------

switch(config-sync-sp)# import running-config exclude interface ethernet 
switch(config-sync-sp-import)# show switch-profile buffer 

switch-profile  : s5010
----------------------------------------------------------
Seq-no  Command
----------------------------------------------------------
2       interface port-channel1
2.1       vpc 1
2.2       speed 10000
3       interface port-channel100
3.1       vpc peer-link
3.2       spanning-tree port type network
3.3       speed 10000

switch(config-sync-sp-import)# commit 
Verification successful...
Proceeding to apply configuration. This might take a while depending on amount o
f configuration in buffer.
Please avoid other configuration changes during this time.
Commit Successful
switch(config-sync)# 

Related Commands

Command
Description

abort

Discards the current switch profile configuration.

commit

Commits a switch profile configuration.

copy running-config startup-config

Copies the running configuration to the startup configuration.

show switch-profile buffer

Displays information about the switch profile buffer.

show running-config switch-profile

Displays the running configuration for a switch profile.