Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Cisco > VBS script to backup Cisco configs

Reply
Thread Tools

VBS script to backup Cisco configs

 
 
thefunnel@aol.com
Guest
Posts: n/a
 
      12-01-2005
Hello,

I need some assistance on a script I am writing. Its purpose is to
backup running-config files from Cisco switches via telnet and TFTP.

I need to address the following problems...

1. All the DOS windows open at once, I would like them to open in
order.
2. All the uploaded file names are identical. Hence the previous ones
are overwritten
3. I would like the script to read from a text file of IPs

Any pointers in the right direction would be appreciated.

Many thanks.

@echo off
echo set sh=WScript.CreateObject("WScript.Shell")>telnet.vb s
echo WScript.Sleep 500>>telnet.vbs
echo sh.SendKeys "password">>telnet.vbs
echo sh.SendKeys "~">>telnet.vbs
echo sh.SendKeys "en">>telnet.vbs
echo sh.SendKeys "~">>telnet.vbs
echo sh.SendKeys "password">>telnet.vbs
echo sh.SendKeys "~">>telnet.vbs
echo sh.SendKeys "copy running-config tftp://192.168.0.1">>telnet.vbs
echo sh.SendKeys "~">>telnet.vbs
echo sh.SendKeys "~">>telnet.vbs
echo sh.SendKeys "~">>telnet.vbs
echo sh.SendKeys "exit">>telnet.vbs
echo sh.SendKeys "~">>telnet.vbs

start /realtime telnet.exe 192.168.0.10 (first device)
cscript.exe //nologo telnet.vbs

start /realtime telnet.exe 192.168.0.11 (second device)
cscript.exe //nologo telnet.vbs

del telnet.vbs

 
Reply With Quote
 
 
 
 
garethb
Guest
Posts: n/a
 
      12-11-2005
Hi

I don't know how to do this, but there is a great freeware tool which
achieves the same http://www.kiwisyslog.com/cattools2.htm I works really
well for me.

Regards
--
Gareth Brown | Consultant | 1E Ltd | www.1e.com

<> wrote in message
news: oups.com...
> Hello,
>
> I need some assistance on a script I am writing. Its purpose is to
> backup running-config files from Cisco switches via telnet and TFTP.
>
> I need to address the following problems...
>
> 1. All the DOS windows open at once, I would like them to open in
> order.
> 2. All the uploaded file names are identical. Hence the previous ones
> are overwritten
> 3. I would like the script to read from a text file of IPs
>
> Any pointers in the right direction would be appreciated.
>
> Many thanks.
>
> @echo off
> echo set sh=WScript.CreateObject("WScript.Shell")>telnet.vb s
> echo WScript.Sleep 500>>telnet.vbs
> echo sh.SendKeys "password">>telnet.vbs
> echo sh.SendKeys "~">>telnet.vbs
> echo sh.SendKeys "en">>telnet.vbs
> echo sh.SendKeys "~">>telnet.vbs
> echo sh.SendKeys "password">>telnet.vbs
> echo sh.SendKeys "~">>telnet.vbs
> echo sh.SendKeys "copy running-config tftp://192.168.0.1">>telnet.vbs
> echo sh.SendKeys "~">>telnet.vbs
> echo sh.SendKeys "~">>telnet.vbs
> echo sh.SendKeys "~">>telnet.vbs
> echo sh.SendKeys "exit">>telnet.vbs
> echo sh.SendKeys "~">>telnet.vbs
>
> start /realtime telnet.exe 192.168.0.10 (first device)
> cscript.exe //nologo telnet.vbs
>
> start /realtime telnet.exe 192.168.0.11 (second device)
> cscript.exe //nologo telnet.vbs
>
> del telnet.vbs
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup network router configs R Siffredi Cisco 6 01-03-2009 02:48 AM
Cisco + Linux How to store configs in one script? Sako Cisco 9 08-10-2006 04:08 AM
VBS script to backup Cisco configs thefunnel@aol.com Computer Support 3 12-11-2005 06:04 PM
configs cisco 837 adsl scott_ea@hotmail.com Cisco 0 10-23-2005 01:00 AM
Archiving Cisco configs w/ SNMP? gkg@gmx.de Cisco 12 11-14-2003 05:24 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57