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. And see here for current known issues.

New Member

Copy to running without confirmation

Anyone know it there is a way to run this command: copy test.txt running-config

without have to confirm after that the destination file is realy the running-config?

I'm needing this why?

I need to schedule a shut, no shut in voice-ports.

The way I found to do this is:

Create the flash:test.txt file with:

voice-port 1/0

sh

no sh

voice-port 0/0

sh

no sh

Create a kron schedule as:

kron policy-list DROPCALL

cli copy test.txt running-config

kron occurrence DROP at 19:57 oneshot

policy-list DROPCALL

END

The problem is that the copy command need a confirmation, so it doesn't work.

If there is a way to disable the confirmation it should works.

Or, someone knows how to accomplish that in another way?

regards

9 REPLIES
New Member

Re: Copy to running without confirmation

Hi,

you can use the TERA TERM

http://hp.vector.co.jp/authors/VA002416/ttermp23.zip and make script like

connect '10.0.0.1'

;wait for password prompt

wait 'Password: '

sendln 'mypassword'

wait '>'

sendln 'enable'

wait 'Password: '

sendln 'mypassword'

wait 'myrouter#'

sendln 'copy running-config tftp:'

wait '[]?'

sendln 'Tftp-ip-address'

wait ']?'

sendln 'config.txt'

wait 'myrouter#'

Sendln 'exit'

Vash

New Member

Re: Copy to running without confirmation

This should work but I need an external machine to do that.

My objective is schedule the router itself to do that.

Anyone know how to do that?

New Member

Re: Copy to running without confirmation

Would the 'KRON' command for your respective IOS version be something helpful? Do a search at the home page for "KRON" or "IOS Command Scheduler".

Let us know if it helped.

Green

Re: Copy to running without confirmation

Depending on your IOS version, I believe you can do this with tcl (tool control language, frequently distributed as tcl/tk).

I think I've read that tcl is enabled on the more recent IOS versions. By using tcl, you are running it as a background process, not from the prompt as other scripting would do.

Here's a list of links from the main Cisco site:

http://www.cisco.com/pcgi-bin/search/search.pl?searchPhrase=tcl&x=0&y=0&nv=Search+All+cisco.com%23%23cisco.com&nv=Technical+Support+%26+documentation%23%23cisco.com%23TSD&language=en&country=US&accessLevel=Guest&siteToSearch=cisco.com

If it is available, there are a bunch of learning/"how to" books available. Copying a file should be fairly trivial and shouldn't load the router CPU too much.

Good Luck

Scott

New Member

Re: Copy to running without confirmation

I'm glad someone else has asked this question. I'm trying to set up a kron job that will ftp a copy of a running-config up to an FTP server on a nightly basis but it keeps failing out due to the prompt on the copy command.

Is there any setting or flag I can use on the cli command to remove the prompt for name of remote host and destination filename?

Bronze

Re: Copy to running without confirmation

to do that you have to issue the command:

router(config)#file prompt quiet

So the router will not ask for confirmation on any flash file system operation.

New Member

Re: Copy to running without confirmation

That worked! Thank you very much. I searched CCO for days looking for a solution. I love these forums. :)

New Member

Thank you very much!  This

Thank you very much!  This worked for me as well when trying to create new file directories with an automated tool.

New Member

Re: Copy to running without confirmation

I'm having a similar issue using KRON.

I have been trying to use:

write network tftp://

write does not require a prompt, but 12.2(25r)SEC is forcing the change back to copy. Is write going away??

3996
Views
15
Helpful
9
Replies
CreatePlease login to create content