Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Reply
 
Thread Tools Display Modes
  #1  
Old 02-07-2010, 12:48 PM
vickz1975 vickz1975 is offline
Registered User
 
Join Date: Jan 2010
Posts: 18
Cisco Configuration Backup automation

Hello,
Sorry if this is asked many times before. I didn't find in my quick search.

I am looking for an automated tool to backup configuration scripts from all my Cisco, Juniper devices periodically.

I didn't spend enough time yet, I have to download the SecureCRT and a VB Script, modify the VBScript to suit my requirements and execute?

Can someone guide me the steps please?

Thanks,
Vickz
Reply With Quote
  #2  
Old 02-07-2010, 04:16 PM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
If you're looking for example SecureCRT scripts to backup router and switch configurations, try a search on our forums for "backup config". This search brought up a few threads. Here's one which seems useful.

Does this help?
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]
Reply With Quote
  #3  
Old 02-15-2010, 12:55 PM
vickz1975 vickz1975 is offline
Registered User
 
Join Date: Jan 2010
Posts: 18
Thanks!

Hi Mike,
I found a script and I am trying to understand it.

Is there any document to point out the steps on how the SCRT, TFTP Server, VB script all work together?

How to run the script ? What changes I need to make on SCRT? Do I need a TFTP server or a backup server to store my scripts for running the script ? I am just clueless right now.

Thanks for the help.
Regards,
Vickz
Reply With Quote
  #4  
Old 02-15-2010, 02:03 PM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
Hi Vickz,

I'm not sure where a TFTP server would fit into the picture. I'd like to take a step back to make sure I understand what you need to do.

You said that you were looking for a tool to automate backing up configuration scripts from your Cisco and Juniper devices.

Do you currently backup the configuration scripts?

If so, how?

If you can describe the way you do things manually then it will be easier to understand how a script might help.
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]
Reply With Quote
  #5  
Old 02-15-2010, 03:32 PM
vickz1975 vickz1975 is offline
Registered User
 
Join Date: Jan 2010
Posts: 18
Cisco backup

Hi Mike,
Thanks for your reply. This is my requirement.

I have some Cisco switches and routers (couple of juniper). I want to take a backup of the configuration scripts of these devices. What is the easiest way to do this?

In one of the VB script that I downloaded from your site has the TFTP requirement and I thought I may need it too.

Anyway, I am looking for a VB script that will read IP addresses (and other login credentials) of the devices, logs in, get the script, and write/dump the script in a given directory automatically. I don't want to run this VB script on each device.

Thanks,
Vickz
Reply With Quote
  #6  
Old 02-15-2010, 05:18 PM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
I'm still a bit fuzzy about a couple of the details, so I can't suggest a path.

Is there a configuration script file that resides on the Cisco filesystem?

Or, do you need to do a kind of memory dump to see settings, using something like show ip, show interface, show port, show running-config, etc.?

What do you currently do to get the configuration script?
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]

Last edited by miked; 02-15-2010 at 05:55 PM.
Reply With Quote
  #7  
Old 02-16-2010, 10:48 AM
vickz1975 vickz1975 is offline
Registered User
 
Join Date: Jan 2010
Posts: 18
Backup configs

Mike,
Thanks for you reply and patience.

I am looking to backup "running config" from Cisco and juniper devices. Currently I am taking a file capture with putty (with show run) or either cutting and pasting it from the screen output from the "show run" command.

There are couple of VBscripts there and I didn't go through each of them. I am looking for something that has
username
pwd
enable password

I want to put all the IP addresses of the devices I have in a file
I want the VBscript to read this file
Take the username, pwd, enable-pwd (same for all devices) and
dump the "show running-config" output in a file (in a given directory).

Thanks for your help!

Regards,
Vickz
Reply With Quote
  #8  
Old 02-16-2010, 02:03 PM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
Vickz,

I think I understand where you're wanting to go with this. Can you tell me where the IP addresses are currently stored (are they in an Excel Spreadsheet, for example)?
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]
Reply With Quote
  #9  
Old 02-16-2010, 04:32 PM
vickz1975 vickz1975 is offline
Registered User
 
Join Date: Jan 2010
Posts: 18
Cisco backup

Hi Mike,
I have saved my IP addresses in a notepad file (with a CR).

I played little bit with some of the code samples some members posted but none of them is working completely.

I am looking for a simple VB script that can read IP addresses from a notepad file (or someother file), read admin, pwd, en-pwd and dump the output of show commands. I guess this is a standard requirement for any one.

I have same admin a/c, same login pwd and same enable pwd for all my Cisco devices.

Hope this helps. I can mail you the code I tried if you want me to.

Thanks,
Vickz
Reply With Quote
  #10  
Old 02-16-2010, 05:01 PM
vickz1975 vickz1975 is offline
Registered User
 
Join Date: Jan 2010
Posts: 18
Sample script (not working)

Hi Mike,
I am posting a sample script and a note in scripting forum to get some help.

Thanks,
Vickz
Reply With Quote
  #11  
Old 02-16-2010, 06:59 PM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
Vickz,

There is an example script in another post in our script examples sticky that reads a hosts file and a commands file. It runs the commands on each host and logs output based on your preference (configurable through a Boolean value).

Does this script help get you a little closer to what you're wanting?
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]

Last edited by bgagnon; 04-25-2018 at 09:47 AM.
Reply With Quote
  #12  
Old 02-22-2010, 08:45 AM
vickz1975 vickz1975 is offline
Registered User
 
Join Date: Jan 2010
Posts: 18
Thank you!

Hi Mike,
I could modify one of the scripts posted and test it. It is working and I am happy. I am planning to buy the s/w.

Thanks for your help.

Regards,
Vickz
Reply With Quote
  #13  
Old 02-22-2010, 09:09 AM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
Hi Vickz,

Glad to hear it's working - thanks for letting us know!
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]
Reply With Quote
  #14  
Old 05-18-2010, 08:49 PM
oyvellef oyvellef is offline
Registered User
 
Join Date: May 2010
Posts: 1
Cisco config backup - another option

Just saw this thread mentioned in the VanDyke newsletter. Using a CRT script is one way of doing it, thanks for the example script! There are several other methods of achieving config backup, some may suit your network better than others.

One little known feature of newer Cisco IOS versions automates the config backup nicely, it might be a good solution for you;

Example config that will save a copy of the router config on a tftp server, with the filename core1-archive every time you save (write mem) the config on the router.

Code:
conf t
archive
 log config
  logging enable
 path tftp://192.168.33.22/core1-archive
 write-memory
More info here

And a good blog post here

Best regards,
Oyvind Ellefsen
Cisco CCIE
Atea, Oslo, Norway
Reply With Quote
  #15  
Old 05-27-2010, 09:38 AM
kmian kmian is offline
Registered User
 
Join Date: May 2010
Posts: 1
Need help with a cisco script.

Folks, can someone modify and provide me a script similiar to the below script that reads the hosts from a file, and then reads the commands from a file and then create a seperate file for each hosts containing the outputs of all the commands (the below script create a seperate file per host per command, whereas I need a seperate file per host containing the outputs of commands).

Thanks

kmian


Quote:
Originally Posted by miked
Vickz,

I've attached an example script which reads a hosts file and a commands file. It runs the commands on each host and logs output to a separate file. The log filenames are based on the host, the command, and a date/time stamp.

Since you have the same username and password for each host, you may could uncomment the g_strUsername and
g_strIdentity variables. You would also want to uncomment and modify the strConnectString code, and comment out the more generic strConnectString.

Does this script help get you a little closer to what you're wanting?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Forum Jump


All times are GMT -6. The time now is 01:34 PM.