cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1765
Views
0
Helpful
6
Replies

How to add "copy run tftp...." at the end of a list of commands to be pasted?

mlafflin
Level 1
Level 1

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

3 Accepted Solutions

Accepted Solutions

srereddy
Level 1
Level 1

Yeah...its simple......add the 'do copy run tftp' command to your text file at the end of all your passwords/logging commands.

View solution in original post

Giuseppe Larosa
Hall of Fame
Hall of Fame

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

View solution in original post

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

View solution in original post

6 Replies 6

srereddy
Level 1
Level 1

Yeah...its simple......add the 'do copy run tftp' command to your text file at the end of all your passwords/logging commands.

Giuseppe Larosa
Hall of Fame
Hall of Fame

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

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?

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

Oh, sounds so easy when you say it like that.

Thanks a bunch guys!

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:///ka-ching.txt run

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:///filename.txt.

You can also substitute "run" with "start".

Review Cisco Networking products for a $25 gift card