03-29-2006 03:13 PM - edited 03-03-2019 12:13 PM
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
03-30-2006 01:08 AM
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
04-10-2006 04:09 AM
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?
04-10-2006 05:06 AM
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.
07-28-2006 12:09 PM
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:
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
07-28-2006 11:48 AM
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?
08-01-2006 09:33 AM
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.
08-01-2006 11:49 AM
That worked! Thank you very much. I searched CCO for days looking for a solution. I love these forums. :)
11-17-2015 08:59 AM
Thank you very much! This worked for me as well when trying to create new file directories with an automated tool.
08-30-2018 10:03 PM
09-14-2006 10:42 AM
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??
01-04-2020 01:45 AM - edited 01-04-2020 01:46 AM
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