05-11-2012 08:37 AM - edited 03-07-2019 06:39 AM
I have a few dozen switches (3560's) that I am logging into to make some changes such as passwords, logging etc. I would then like to copy the new config to my tftp server. I am pasting all the command in while in global config mode, but then I have to manually leave global config mode and run through the copy run TFTP routine. Is there a way i could just put that into my text file and paste it in with all the rest of the changes?
Any help is greatly appreciated,
-Matt
Solved! Go to Solution.
05-11-2012 08:42 AM
Yeah...its simple......add the 'do copy run tftp' command to your text file at the end of all your passwords/logging commands.
05-11-2012 08:43 AM
Hello Matt,
the end keyword should allow you to exit configuration mode at once from whatever config level you are
so the text file can look like the following:
command1
command2
....
commandN
end
copy run tftp
note: exit could be an alternative to end only if in global config mode, otherwise exit goes up one level only in config hierarchy
Hope to help
Giuseppe
05-11-2012 09:15 AM
Follow Giuseppe and then after the copy run tftp hit enter and then put the IP address of the TFTP server and hit enter again. Then cut and paste it and you should be good to go.
Mike
05-11-2012 08:42 AM
Yeah...its simple......add the 'do copy run tftp' command to your text file at the end of all your passwords/logging commands.
05-11-2012 08:43 AM
Hello Matt,
the end keyword should allow you to exit configuration mode at once from whatever config level you are
so the text file can look like the following:
command1
command2
....
commandN
end
copy run tftp
note: exit could be an alternative to end only if in global config mode, otherwise exit goes up one level only in config hierarchy
Hope to help
Giuseppe
05-11-2012 09:01 AM
First, thank you both.
I guess what I probably should have also asked was this:
When I use the "copy run tftp" command I'll be prompted for the address and to verify the file name. How do I go about entering that in along with the command? Is there a way to enter into the config the TFTP address before hand perhaps?
05-11-2012 09:15 AM
Follow Giuseppe and then after the copy run tftp hit enter and then put the IP address of the TFTP server and hit enter again. Then cut and paste it and you should be good to go.
Mike
05-11-2012 09:22 AM
Oh, sounds so easy when you say it like that.
Thanks a bunch guys!
05-12-2012 12:05 AM
Here's what I understand from your post:
1. Change the username/password;
2. Make other changes;
3. Copy the config
If this is the case, then I recommend this:
Open a text editor and enter the following:
username baddabing password 5 baddaboom
hostname Hakuna_Mata
Save the file, say, ka-ching.txt.
Remote into the switch and issue the following command:
1. copy tftp://
This tells the appliance to copy the file "ka-ching.txt" into the running-config. If your are dead-sure about your config, you can change the last bit of the command from "run" to "start".
2. To backup the running/startup config, just issue this command: sh run | redirect tftp://
You can also substitute "run" with "start".
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