08-01-2011 03:37 AM - edited 03-07-2019 01:29 AM
Hi,
I'm looking to make saving configurations a little easier.
Is there a way send my switches configurations to a tftp server with one command?
Instead of copy run tftp,
then tftp addresss,
then the name of the config?
Just trying to make things easier.
For instance, could could the tftp server address be configured already on the switch and the name of the image to be copied to it, so I could save the config to it with one command.
Thanks, Pat.
Solved! Go to Solution.
08-01-2011 04:13 AM
Hi Pat,
you can create an exec alias or you can create an archive. It depends what you wanna achive. the exec alias you have to configure like this:
alias exec tftpcopy copy running-config tftp://[ip address]/[filename]
this just copies the running config with one command in this case tftpcopy, you still can modify the filename, but there is mechanism which adds the timestamp.
the archive function is triggered as soon as you copy running-config to startup config. it copies the the config to an tftp destination as well as to the startup config with a version number. Still there is no timestamp in the filename but the version number is incremented. The configuration is also saved to the tftp every 1440 minutes with the time-period command.
You can configure the archive like this:
archive
log config
logging size 1000
notify syslog
hidekeys
path tftp://[ip address of tftp server]/[foldername]/[filename]
write-memory
time-period 1440
no file verify auto
you find more there
http://www.cisco.com/en/US/docs/ios/12_3t/fun/command/reference/cfrgt_01.html#wp1094316
regards
alex
08-01-2011 03:41 AM
Hi Pat,
try this, copy running-config tftp://[ip address of tftpserver]/[folder]/[name of file]
regards
alex
08-01-2011 03:50 AM
Thanks Alex
That is better but, is there a way to automate it even more. For instance, have the server address, folder name, and name of config file already configured on the switch and then with one short command send it to the tftp server with the current date applied to the name of the file?
08-01-2011 04:09 AM
Patrick
I haven't used this for a while but something like Kiwi Catools can do this for you -
http://www.kiwisyslog.com/kiwi-cattools-features-and-benefits/
if you don't have that many switches then the freeware version may be all you need.
Jon
08-01-2011 04:13 AM
Hi Pat,
you can create an exec alias or you can create an archive. It depends what you wanna achive. the exec alias you have to configure like this:
alias exec tftpcopy copy running-config tftp://[ip address]/[filename]
this just copies the running config with one command in this case tftpcopy, you still can modify the filename, but there is mechanism which adds the timestamp.
the archive function is triggered as soon as you copy running-config to startup config. it copies the the config to an tftp destination as well as to the startup config with a version number. Still there is no timestamp in the filename but the version number is incremented. The configuration is also saved to the tftp every 1440 minutes with the time-period command.
You can configure the archive like this:
archive
log config
logging size 1000
notify syslog
hidekeys
path tftp://[ip address of tftp server]/[foldername]/[filename]
write-memory
time-period 1440
no file verify auto
you find more there
http://www.cisco.com/en/US/docs/ios/12_3t/fun/command/reference/cfrgt_01.html#wp1094316
regards
alex
08-01-2011 06:34 AM
Hi,
For a test I configured:
alias exec tftpcopy copy run tftp://10.200.0.120/C:\Documents_and_Settings\pmchenry\Desktop\NEWCONFIG\Config
When I save it:
Switch#tftpcopy
Address or name of remote host [10.X.X.X]?
Destination filename [C:\Documents_and_Settings\pmchenry\Desktop\NEWCONFIG\Config]? 2011-8-1
!!!!
13684 bytes copied in 1.484 secs (9221 bytes/sec AcademicCtr2#tftpcopy
13684 bytes copied in 1.484 secs (9221 bytes/sec
Wondering if I can automate a timestamp to the file name so it will not only give it a unique name but, will be in order in the folder?
Thanks, Pat.
08-01-2011 08:01 PM
Other way, very simple that you can use Config Download function in Solarwind toolset. You only have the RW community-string, after that click and click, not command line in here.
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