Applying the show running config Output to Another Cisco APIC

This section explains how to use the export config and import config CLIs to use the show running config output on another Cisco APIC.

About Import and Export Configurations

The import config and export config commands enable you to apply the show running config output to another Cisco APIC. This section contains the guidelines for these commands and demonstrates how the commands are executed.

Import and Export Configuration Guidelines and Limitations

This section explains the guidelines and limitations for the export config and import config commands.

  • Passwords and other encrypted data are not included in the configuration file.

  • Some REST API configurations may not be compatible with CLI configurations; this may cause errors when applying a configuration file to a Cisco APIC.

  • Some features require configurations to be in a specific order. These configurations are validated when performed through the CLI. Configurations through the REST API, however, are not validated and may cause errors when running the imported file due to missing configurations.

  • Interactive commands are prefixed with a "#" and ignored when running the configuration file.

Exporting a CLI Configuration

This procedure shows how to export a configuration to a text file.

Procedure

  Command or Action Purpose
Step 1

configure

Example:

dev4-ifc1# configure

Enters configuration mode.

Step 2

leaf ID

Example:

dev4-ifc1(config)#  leaf 101

Identifies the leaf with the configuration to be exported.

Step 3

interface ethernet slot/port

Example:

dev4-ifc1(config-leaf)# interface ethernet 1/34

Identifies the slot number and port number for an existing Ethernet interface.

Step 4

export-config result-file-name

Example:

dev4-ifc1(config-leaf-if)# export-config /tmp/showRunnLeaf101.txt

Exports the configuration to a specified file name.

Example

This example shows how to configure export-config.

dev4-ifc1# config
dev4-ifc1(config)# leaf 101
dev4-ifc1(config-leaf)# interface ethernet 1/34
dev4-ifc1(config-leaf-if)# export-config /tmp/showRunnLeaf101.txt
dev4-ifc1(config-leaf-if)# cat /tmp/showRunnLeaf101.txt
config
# Command: show running-config leaf 101 interface ethernet 1 / 34
# Time: Fri Sep 23 16:03:48 2016
  leaf 101
    interface ethernet 1/34
      switchport trunk allowed vlan 602 tenant t1 external-svi l3out l3ext1sub1
      exit
    exit
dev4-ifc1(config-leaf-if)#

Importing a CLI Configuration

This procedure shows how to import a configuration from a text file.

Procedure

Command or Action Purpose

import-config file-name

Example:

dev4-ifc1(config-tenant)# import-config /tmp/showRunnLeaf101.txt 
config
# Command: show running-config leaf 101 interface ethernet 1 / 34
# Time: Fri Sep 23 16:03:48 2016
leaf 101
interface ethernet 1/34
switchport trunk allowed vlan 602 tenant t1 external-svi l3out l3ext1sub1
exit
exit
dev4-ifc1(config)#