02-18-2015 11:00 PM
Hello everybody,
I am trying to write a CLI Template in cisco Prime to save the running-configuration of our core switch to the FTP server,
I have already configured the FTP username and Password in the core Switch
ip ftp username cisco
ip ftp password cisco123
in Cisco Prime I have created a template as follow:
copy running-config ftp:
$FTP_IP_addrress >> the FTP Server
$name >> the name of file and the date
After deploying this template on the core switch,
I received Error Msg in Prime as follow:
02-19-2015 07:37 AM
Hello Hussein,
First thing that I see is that you will need to tell Prime to run the commands from enable mode instead of global config mode which Prime will default to.
Here is a sample write memory config that I deploy to devices...
#MODE_ENABLE
write memory
#MODE_END_ENABLE
Here is a link to the doc that has some of the format available for employing this, which will need some interactive commands sent to it as well.
03-02-2015 07:45 PM
Thank you Bkennedy for replying,
I changed my template to be as follow:
#MODE_ENABLE
copy running-config ftp:
$Mgmt_IP_addrress
$name
#MODE_END_ENABLE
but still I am receiving Error like :
Error : Exception while sending interactive commands to device, Expect timeout: Failed to match expected device output due to Expect timeout current timeout 60000. Current output : Address or name of remote host []? Current expects : (DC-450.{0,30}|DC-4507-AGG)\([^\)]+\)#\s*\z DC-4507-AGG#
I believe that we have to tell the Prime how to send the variables to Switch, because the switch is waiting for the remote host IP address and the destination file name???
DC-4507-AGG#copy running-config ftp:
Address or name of remote host []? X.Y.Z.W
Destination filename [dc-4507-agg-confg]?
% VRF table-id 0 not active
% VRF table-id 0 not active
Writing dc-4507-agg-confg !
24425 bytes copied in 1.500 secs (16283 bytes/sec)
DC-4507-AGG#
03-02-2015 09:58 PM
Hi,
I tried the following template and its working now :
#MODE_ENABLE
#INTERACTIVE
copy running-config ftp: <IQ>Address or name of remote host<R>X.Y.Z.W <IQ>Destination filename <R>test
#ENDS_INTERACTIVE
#MODE_END_ENABLE
thank you
03-03-2015 06:48 AM
Hi Hussein,
Good to know that it worked for you! I was also testing this out and the same principle works for copy run start as well.
#MODE_ENABLE
#INTERACTIVE
copy running-config startup-config <IQ>Destination filename<R>startup-config
#ENDS_INTERACTIVE
#MODE_END_ENABLE
You also can still apply variables throughout your config in case you have other locations that need the config file, as well as setting the file name that you want as well.
Regards,
Brandon
08-19-2015 03:07 PM
Hello,
I'm glad to see this worked for you as I had attempted this today and was unsuccessful. I'm looking to take it one step further and grab the hostname from the switch to add the the name of the file. Have you attempted this or know how to do this?
Thanks,
08-24-2018 08:50 PM - edited 08-24-2018 08:51 PM
Hi
Your template doesn't work. I tried the following template and its working now :
#MODE_ENABLE
#INTERACTIVE
copy running-config ftp://ali:abbaszadeh@ <IQ>Address or name of remote host<R>10.100.224.100<IQ>Destination filename <R>
#ENDS_INTERACTIVE
#MODE_END_ENABLE
!!!!!!!!!!!!!!!!!!!!!!!!!!!
ali is username
abbaszadeh is password
10.100.224.100 is ip of ftp server
Don't forget to use @
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide