Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

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

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

Everyone's tags (5)
3 ACCEPTED SOLUTIONS

Accepted Solutions
New Member

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

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

Hall of Fame Super Silver

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

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

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

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

6 REPLIES
New Member

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

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

Hall of Fame Super Silver

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

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

New Member

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

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?

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

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

New Member

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

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

Thanks a bunch guys!

Hall of Fame Super Gold

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

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".

1042
Views
0
Helpful
6
Replies