Importing and Exporting Tech Support Logs and Configurations
The examples in this section show how to use the Cisco IMC XML API to import and export technical support logs and configurations. Each example shows the XML API request followed by the response from Cisco IMC.
This section includes the following examples:
Retrieving Tech Support Log
Request:
<configResolveClass cookie="1420620154/3f9d68ff-0b0c-1c0b-8002-91fabb1b0ff4"
inHierarchical="false" classId="sysdebugTechSupportExport"/>
Response:
<configResolveClass cookie="1420620154/3f9d68ff-0b0c-1c0b-8002-91fabb1b0ff4"
response="yes" classId="sysdebugTechSupportExport">
<outConfigs>
<sysdebugTechSupportExport dn="sys/chassis-1/tech-support" adminState="disabled"
hostname="10.106.27.149" protocol="TFTP" remoteFile="sriparim-20150104-185635.tar.gz"
user="" component="all" pwd="" fsmStageDescr="error" fsmProgr="0"
fsmStatus="tftp-upload-error"/>
</outConfigs>
</configResolveClass>
Retrieving Tech Support Log Using DN
Request:
<configResolveDn cookie="1420620154/3f9d68ff-0b0c-1c0b-8002-91fabb1b0ff4"
dn='sys/chassis-1/tech-support' inHierarchical="false"/>
Response:
<configResolveDn cookie="1420620154/3f9d68ff-0b0c-1c0b-8002-91fabb1b0ff4"
response="yes" dn="sys/chassis-1/tech-support">
<outConfig>
<sysdebugTechSupportExport dn="sys/chassis-1/tech-support" adminState="disabled"
hostname="10.106.27.149" protocol="TFTP" remoteFile="sriparim-20150104-185635.tar.gz"
user="" component="all" pwd="" fsmStageDescr="error" fsmProgr="0"
fsmStatus="tftp-upload-error"/>
</outConfig>
</configResolveDn>
Generating and Exporting Tech Support Data for CMC 1
-
only all—For all components.
-
cmc2—For CMC 2.
-
cimc1—For Cisco IMC server 1.
-
cimc2—For Cisco IMC server 2.
The following example shows how to export the technical support data using SCP protocol. You can also upgrade the firmware using the following other protocols:
-
FTP
-
SFTP
-
TFTP
-
HTTP
Request:
<configConfMo cookie="1420636265/1e591b55-100c-1c10-8005-91fabb1b0ff4"
inHierarchical="false" dn="sys/chassis-1/tech-support">
<inConfig>
<sysdebugTechSupportExport dn="sys/chassis-1/tech-support" adminState="enabled"
remoteFile="/home/sriparim/techsupport.tgz" user="sriparim" pwd="password"
protocol="scp" component="cmc1" hostname="10.106.27.149"/>
</inConfig>
Response:
<configConfMo dn="sys/chassis-1/tech-support"
<outConfig>
<sysdebugTechSupportExport dn="sys/chassis-1/tech-support"
adminState="disabled" hostname="10.106.27.149" protocol="scp"
remoteFile="/home/sriparim/techsupport.tgz" user="sriparim"
component="cmc1" pwd="" fsmStageDescr="completed" fsmProgr="100"
fsmStatus="success" status="modified"/>
</outConfig>
</configConfMo>
Verifying the Status of the Tech Support Data Export
Request:
<configResolveDn cookie="1420620154/3f9d68ff-0b0c-1c0b-8002-91fabb1b0ff4"
dn='sys/chassis-1/tech-support' inHierarchical="false"/>
Response:
<configResolveDn cookie="1420636265/1e591b55-100c-1c10-8005-91fabb1b0ff4"
response="yes" dn="sys/chassis-1/tech-support">
<outConfig>
<sysdebugTechSupportExport dn="sys/chassis-1/tech-support" adminState="enabled"
hostname="10.106.27.149" protocol="scp" remoteFile="/home/sriparim/techsupport.tgz"
user="sriparim" component="cmc1" pwd="" fsmStageDescr="collecting" fsmProgr="20"
fsmStatus="exporting"/>
</outConfig>
</configResolveDn>
Exporting CMC Configuration
The following example shows how to export the CMC configuration using the SCP protocol. You can also upgrade the firmware using the following other protocols:
-
FTP
-
SFTP
-
TFTP
-
HTTP
Request:
<configConfMo cookie="1420636265/1e591b55-100c-1c10-8005-91fabb1b0ff4"
inHierarchical="false" dn="sys/chassis-1/export-config">
<inConfig>
mgmtBackup dn="sys/chassis-1/export-config" adminState="enabled"
entity="CMC" proto="scp" user="uldeshmu" pwd="cisco123" passphrase="abcdefgh"
hostname="10.104.255.217" remoteFile="/home/uldeshmu/c250_config_export.cfg"/>
</inConfig>
</configConfMo>
Response:
<configConfMo dn="sys/chassis-1/export-config" response="yes">
<outConfig>
<mgmtBackup dn="sys/chassis-1/export-config" entity="" adminState="enabled"
fsmStageDescr="Collecting configuration data" fsmRmtInvErrCode=""
fsmRmtInvErrDescr="NONE" fsmDescr="export-config" proto="none" hostname=""
remoteFile="" user="" pwd="" passphrase="" status="modified" >
</mgmtBackup>
</outConfig>
</configConfMo>
Exporting BMC Configuration
The following example shows how to export the BMC configuration using the SCP protocol. You can also upgrade the firmware using the following other protocols:
-
FTP
-
SFTP
-
TFTP
-
HTTP
Request:
<configConfMo cookie='cookiecutter' inHierarchical="false"
dn="sys/chassis-1/server-1/exporter-config">
<inConfig>
<mgmtBackupServer dn="sys/chassis-1/server-1/exporter-config"
adminState="enabled" entity="CIMC1" proto="scp" user="uldeshmu"
pwd="cisco123" hostname="10.104.255.217"
remoteFile="/home/uldeshmu/c250_config_export_cimc.cfg"/>
</inConfig>
</configConfMo>
Response:
<configConfMo dn="sys/chassis-1/server-1/exporter-config"
cookie="1423754785/ec33d7e1-e50e-1ee5-8002-d27f77e2cff4" response="yes">
<outConfig>
<mgmtBackupServer dn="sys/chassis-1/server-1/exporter-config" entity=""
adminState="disabled" fsmStageDescr="COMPLETED" fsmRmtInvErrCode="100"
fsmRmtInvErrDescr="NONE" fsmDescr="export-config" proto="none" hostname=""
remoteFile="" user="" pwd="" status="modified" >
</mgmtBackupServer>
</outConfig>
</configConfMo>
Feedback