Cisco DCNM Configuration

Data Center Network Manager (DCNM) with SFTP Switch Configuration Backup
Document ID: 115754
Contributed by Jim Hicks, Cisco TAC Engineer. Mar 06, 2013
Contents
Introduction Prerequisites
Requirements Components Used Conventions
Procedure
Manual Backup
Automatic (Scheduled) Backup
Related Information
Introduction
This document describes how to back up a switch configuration with Cisco Data Center Network Manager (DCNM) through SFTP.
Prerequisites
Requirements
Ensure that you meet these requirements before you attempt this configuration:
All switches to be backed up must have an FM_SERVER license. You must have a secure FTP (SFTP) server and user account. You must have an Simple Network Management Protocol (SNMP) version 3 user account. You must have a Secure Shell (SSH) user account.
Components Used
The information in this document is based on the Cisco Data Center Network Manager (DCNM) 5.2(x).
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Conventions
Refer to Cisco Technical Tips Conventions for more information on document conventions.
Procedure
Manual Backup
Complete these steps in order to use DCNM and SFTP to back up a switch configuration:
Install an SFTP/SCP server on a DCNM workstation.1. Configure a username and password on the SFTP workstation.
Note: This user must have all privileges in the SFTP root directory which includes upload/download/delete/rename/list directory.
2.
Log in to the DCNM web interface.3. Click Admin > SFTP credentials.4. Fill in the information for the SFTP server.
This information is used on the switch to transfer the configuration file to the SFTP server. The Root Directory is the path to the root directory configured on the SFTP server.
Example: On a Windows platform, this might be something like "C:\SFTP".
5.
Choose a verification switch to test against.6. Click Verify and Apply.7.
Once you click Verify and Apply, these steps occur:
SSH session is opened to the switch.1. The CLI is used to copy the switch name to a file on bootflash.2. The CLI is used to copy the bootflash file to the SFTP server.3. The bootflash file is deleted.4.
If this backup was real, the file would be the switch configuration, and these steps would also occur:
The configuration file is copied from the SFTP server directory to the DCNM database.1. The configuration file in the SFTP directory is deleted.2.
The status of the operation is reported in the Info dialog box. Here is an example of a successful test:
You can view the logs in the Logs menu (Admin > Logs > Web Reports); here is a sample log:
!−−− Switch names is MDF−FABRIC−A.
MDS−FABRIC−A#
!−−− The IP address of the switch is 172.18.121.66.
2012.05.12 10:07:19 INFO [FM.WebReport] show switchname > bootflash:172.18.121.66−120512−100716−TEST
MDS−FABRIC−A# copy bootflash:172.18.121.66−120512−100716−TEST sftp://Jim@172.18. 121.71/172.18.121.66−120512−100716−TEST
!−−− SFTP user ID is Jim. !−−− The SFTP (DCNM) server IP address is 172.18.121.71.
Jim@172.18.121.71's password:
2012.05.12 10:07:20 INFO [FM.WebReport] Connected to 172.18.121.71. sftp> put /bootflash/172.18.121.66−120512−100716−TEST /172.18.121.66−120512−100716−TEST
Uploading /bootflash/172.18.121.66−120512−100716−TEST to /172.18.121.66−120512−100716−TEST
/bootflash/172.18.121.66−120512−100716−TEST 0% 0 0.0KB/s −−:−− ETA /bootflash/172.18.121.66−120512−100716−TEST 100% 13 0.0KB/s 00:00 sftp> exit
Copy complete, now saving to disk (please wait)...
MDS−FABRIC−A#
2012.05.12 10:07:20 INFO [FM.WebReport] Successful backup
2012.05.12 10:07:20 INFO [FM.WebReport] delete bootflash:172.18.121.66−120512−100716−TEST
Here is an example of a failure to connect to the switch with SSH:
MDS−FABRIC−A#
2012.05.12 10:32:49 INFO [FM.WebReport] Start Running Config Diff Report Async FID:70 vsanPK: Report Type:14
2012.05.12 10:32:49 INFO [FM.WebReport] Starting report Verify Server Credentials ,report ID:917511
2012.05.12 10:32:53 INFO [FM.WebReport] Unable to open connection to Switch MDS−FABRIC−A
2012.05.12 10:32:53 INFO [FM.WebReport] Unable to open connection to Switch MDS−FABRIC−A
Here is an example of SFTP failed due to bad username or password:
Note: An incorrect username was used to generate the sample output below; however, an incorrect password
Loading...
+ 4 hidden pages