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
generates the same failure.
MDS−FABRIC−A#
2012.05.12 14:47:31 INFO [FM.WebReport] show switchname > bootflash:172.18.121.66−120512−144728−TEST
MDS−FABRIC−A# copy bootflash:172.18.121.66−120512−144728−TEST sftp://test@172.18 .121.71/172.18.121.66−120512−144728−TEST
test@172.18.121.71's password:
2012.05.12 14:47:31 INFO [FM.WebReport] Permission denied, please try again.
test@172.18.121.71's password:
2012.05.12 14:47:31 INFO [FM.WebReport] Incorrect Password
2012.05.12 14:48:25 INFO [FM.WebReport] Permission denied, please try again.
test@172.18.121.71's password: Permission denied, please try again.
test@172.18.121.71's password:
2012.05.12 14:48:31 INFO [FM.WebReport] Permission denied, please try again.
test@172.18.121.71's password: Permission denied, please try again.
Note: Always check the logs if a test is unsuccessful.
Automatic (Scheduled) Backup
Complete these steps in order to schedule a job to back up the configuration from the fabric daily:
In the DCNM web interface, click Backup > Create.1.
Expand SAN, and select the fabric.2. In the Backup Options area, click the Repeat radio button that corresponds to how often you want the job to run.
3.
Enter a start date in the Start field and an end date in the End field.4. Click Create.5.
To view the job you just created, go to Backup > Jobs.
After a job has run, view the Status column for information about the process.
This image shows there are seven (7) switches on the fabric but only two (2) were backed up.
Go to Admin > Logs to view detailed information in the logs:
MDS−FABRIC−A#
2012.05.12 15:05:00 INFO [FM.WebReport]
−−−−−−−Begin backup for switch: Static−5596−A−−−−−−−
2012.05.12 15:05:00 INFO [FM.WebReport] Skipping unlicensed Switch Static−5596−A
2012.05.12 15:05:00 INFO [FM.WebReport]
−−−−−−−Begin backup for switch:F340.24.10−5548−1−x−−−−−−−
2012.05.12 15:05:00 INFO [FM.WebReport] Skipping non SNMP v3 Switch F340.24.10−5548−1−x
2012.05.12 15:05:00 INFO [FM.WebReport]
−−−−−−−Begin backup for switch:MDS−FABRIC−A−−−−−−−
2012.05.12 15:05:02 INFO [FM.WebReport] copy running−config bootflash:172.18.121.66−120512−150501−R
Copy complete, now saving to disk (please wait)...
MDS−FABRIC−A#
2012.05.12 15:05:05 INFO [FM.WebReport] copy running−config bootflash:172.18.121.66−120512−150501−R
Copy complete, now saving to disk (please wait)...
MDS−FABRIC−A# copy bootflash:172.18.121.66−120512−150501−R sftp://Jim@172.18.121 .71/172.18.121.66−120512−150501−R
Jim@172.18.121.71's password:
2012.05.12 15:05:06 INFO [FM.WebReport] Connected to 172.18.121.71. sftp> put /bootflash/172.18.121.66−120512−150501−R /172.18.121.66−120512−150501−R
Uploading /bootflash/172.18.121.66−120512−150501−R to
/172.18.121.66−120512−150501−R
/bootflash/172.18.121.66−120512−150501−R 0% 0 0.0KB/s −−:−− ETA /bootflash/172.18.121.66−120512−150501−R 100% 25KB 25.4KB/s 00:00 sftp> exit
Copy complete, now saving to disk (please wait)...
MDS−FABRIC−A#
2012.05.12 15:05:06 INFO [FM.WebReport] Successful backup
2012.05.12 15:05:06 INFO [FM.WebReport] delete bootflash:172.18.121.66−120512−150501−R
MDS−FABRIC−A#
2012.05.12 15:05:06 INFO [FM.WebReport]
−−−−−−−Begin backup for switch:F340−−−−−−−
2012.05.12 15:05:06 INFO [FM.WebReport] Skipping unlicensed Switch F340
2012.05.12 15:05:06 INFO [FM.WebReport]
−−−−−−−Begin backup for switch:F440−−−−−−−
2012.05.12 15:05:06 INFO [FM.WebReport] Skipping unlicensed Switch F440
2012.05.12 15:05:06 INFO [FM.WebReport]
−−−−−−−Begin backup for switch:N7K−24−13−7010−1−fcoe−−−−−−
2012.05.12 15:05:06 INFO [FM.WebReport] Skipping non SNMP v3 Switch N7K−24−13−7010−1−fcoe
2012.05.12 15:05:06 INFO [FM.WebReport]
−−−−−−−Begin backup for switch:24−−−−−−−
2012.05.12 15:05:11 INFO [FM.WebReport] copy running−config bootflash:172.18.121.43−120512−150508−R
Copy complete, now saving to disk (please wait)...
24.10.5020A.1#
2012.05.12 15:05:15 INFO [FM.WebReport] copy running−config bootflash:172.18.121.43−120512−150508−R
Copy complete, now saving to disk (please wait)...
24.10.5020A.1# copy bootflash:172.18.121.43−120512−150508−R sftp://Jim@172.18.12 1.71/172.18.121.43−120512−150508−R vrf management
Jim@172.18.121.71's password:
2012.05.12 15:05:15 INFO [FM.WebReport] Connected to 172.18.121.71. sftp> put /bootflash/172.18.121.43−120512−150508−R /172.18.121.43−120512−150508−R
Uploading /bootflash/172.18.121.43−120512−150508−R to /172.18.121.43−120512−150508−R
/bootflash/172.18.121.43−120512−150508−R 0% 0 0.0KB/s −−:−− ETA /bootflash/172.18.121.43−120512−150508−R 100% 27KB 27.4KB/s 00:00 sftp> exit
Copy complete, now saving to disk (please wait)...
24.10.5020A.1#
2012.05.12 15:05:15 INFO [FM.WebReport] Successful backup
2012.05.12 15:05:16 INFO [FM.WebReport] delete bootflash:172.18.121.43−120512−150508−R
24.10.5020A.1#
2012.05.12 15:05:16 INFO [FM.WebReport] Backed up Fabric Fabric_MDS−FABRIC−A, Switches 2 out of 7 in 0 minutes. *********************************************************
The log shows that only 2 of the 7 switches were backed up:
Two (2) were backed up OK. There (3) were skipped because they did not have a license. Two (2) were skipped because they did not have SNMPv3 enabled.
To view the backed up configuration, go to Backup > View.
You can view, delete, copy, and edit the backups, or you can save them to a local file.
Related Information
Technical Support & Documentation − Cisco Systems
Contacts & Feedback | Help | Site Map © 2012 − 2013 Cisco Systems, Inc. All rights reserved. Terms & Conditions | Privacy Statement | Cookie Policy | Trademarks of Cisco Systems, Inc.
Updated: Mar 06, 2013 Document ID: 115754
Loading...