How do I copy the the run config on a notepad

amb1s1amb1s1 Member Posts: 408
Hi. I know that I can do the normal copy and paste, but I will like to know if there is command that will do that for you, like something like this [/code]SH run /notepad

David G.
http://gomezd.com <
My Tshoot test Blog
http://twitter.com/ipnet255

Comments

  • phantasmphantasm Member Posts: 995
    No. I believe you can copy the config to tftp, otherwise if your using Hyper Terminal then use text capture and issue a sh run.
    "No man ever steps in the same river twice, for it's not the same river and he's not the same man." -Heraclitus
  • MishraMishra Member Posts: 2,468 ■■■■□□□□□□
    I remember using a function like this... Try

    show and more Command Output Keywords for Writing to a File

    This feature enhances the show commands in the Cisco IOS CLI to allow large amounts of data output to be written directly to a file for later reference. This file can be saved on local or remote storage devices such as flash memory, a SanDisk, or an external memory device.

    For each show command issued, a new file can be created, or the output can be appended to an existing file. Command output can optionally be displayed on-screen while being redirected to a file by using the tee keyword. Redirection is available using a pipe (|) character after any show command, combined with the redirect, append, or tee keywords.

    These extensions can also be added to more commands.
    My blog http://www.calegp.com

    You may learn something!
  • PashPash Member Posts: 1,600 ■■■■■□□□□□
    copy tftp startup-config

    enter ip of remote host

    enter filename (just copy and paste filename to save time)

    bobs your uncle, now when i do this I always perform a reload to make sure nothing running in the running config is saved to startup. Just my preference but everyone each to their own.
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • cisco_troopercisco_trooper Member Posts: 1,441 ■■■■□□□□□□
    If you are using PuTTy, etc, you can turn on logging and issue your sho run or sho start. The output will then be logged to whichever file you specified in your logging configuration on your telnet client.
  • NetwurkNetwurk Member Posts: 1,155 ■■■■■□□□□□
    It's not that hard to just copy and paste your config into notepad. Even a DOS window lets you copy and paste nowadays.
  • AlanJamesAlanJames Member Posts: 230
    we use a pearl script to backup our running configs, i'm pretty sure you can get VPS scripts to download the configs of cisco devices as well.
  • amb1s1amb1s1 Member Posts: 408
    AlanJames: Can you help me with the Pearl scrip?
    David G.
    http://gomezd.com <
    My Tshoot test Blog
    http://twitter.com/ipnet255
  • freetechfreetech Member Posts: 154
    I don't know if you've gotten an answer that you can use, but here's the simplest way that I know to explain it:
    1. Open up HyperTerm or puTTy or whatever teminal emulation program you use.
    2. Connect to the hardware that you want to copy.
    I think you should be in privileged mode.
    3. Type in
    sh run
    
    4. Highlight the resulting text, right-click and "copy"
    5. Right-click on your monitor desktop and click "new" and "text document"
    6. Open up the text document and right-click and "paste"
    7. Rename the file and you're done.
    Hope that helps.
    Experience is a harsh teacher. She gives the test first, the lesson afterwards.
  • amb1s1amb1s1 Member Posts: 408
    I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.
    David G.
    http://gomezd.com <
    My Tshoot test Blog
    http://twitter.com/ipnet255
  • MishraMishra Member Posts: 2,468 ■■■■□□□□□□
    amb1s1 wrote:
    I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.

    Then a script is a must.

    Write a perl script that logs into your routers, show a sh run-config then pipes the output to a text file and closes the connection. You should probably learn the language so you know how to troubleshoot.
    My blog http://www.calegp.com

    You may learn something!
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Use solarwinds or another network management software and backup all the configs.
    An expert is a man who has made all the mistakes which can be made.
  • amb1s1amb1s1 Member Posts: 408
    Mishra wrote:
    amb1s1 wrote:
    I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.

    Then a script is a must.

    Write a perl script that logs into your routers, show a sh run-config then pipes the output to a text file and closes the connection. You should probably learn the language so you know how to troubleshoot.

    I would like to learn the basics. Where is a good place to start and a good book to read.
    David G.
    http://gomezd.com <
    My Tshoot test Blog
    http://twitter.com/ipnet255
  • cisco_troopercisco_trooper Member Posts: 1,441 ■■■■□□□□□□
    amb1s1 wrote:
    Mishra wrote:
    amb1s1 wrote:
    I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.

    Then a script is a must.

    Write a perl script that logs into your routers, show a sh run-config then pipes the output to a text file and closes the connection. You should probably learn the language so you know how to troubleshoot.

    I would like to learn the basics. Where is a good place to start and a good book to read.

    Jeeze man, have you ever used the internet?

    http://www.google.com/search?hl=en&q=PERL
    http://www.perl.org
    http://www.perl.com
    http://www.cpan.org
  • amb1s1amb1s1 Member Posts: 408
    amb1s1 wrote:
    Mishra wrote:
    amb1s1 wrote:
    I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.

    Then a script is a must.

    Write a perl script that logs into your routers, show a sh run-config then pipes the output to a text file and closes the connection. You should probably learn the language so you know how to troubleshoot.

    I would like to learn the basics. Where is a good place to start and a good book to read.

    Jeeze man, have you ever used the internet?

    http://www.google.com/search?hl=en&q=PERL
    http://www.perl.org
    http://www.perl.com
    http://www.cpan.org

    Sorry men, but I'm not asking how do I search for Pearl info, I am asking for the best. If I go to the bookstore, I know where to look for the pearl books, but how do I know which one is the best. The only way is to asking question.
    David G.
    http://gomezd.com <
    My Tshoot test Blog
    http://twitter.com/ipnet255
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    amb1s1 wrote:
    how do I know which one is the best.

    Apply the O'Reilly rule.... If it's an O'Reilly book and it has a cute animal on the cover, it's got to be good. :D

    Plus that's what I started with, and I never felt the need to look for Perl books by other publishers.

    Learning Perl
    Programming Perl
    Intermediate Perl
    Mastering Perl
    Perl Best Practices
    Perl Cookbook
    Perl Pocket Reference
    Perl Hacks

    Page through Learning Perl and Programming Perl and see which you like better. I preferred the Camel over the Llama.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • korszokorszo Member Posts: 31 ■■□□□□□□□□
    amb1s1 wrote:
    I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.

    http://www.kiwisyslog.com/kiwi-cattools-overview/

    http://www.solarwinds.com/products/cirrus/index.aspx

    RK
  • amb1s1amb1s1 Member Posts: 408
    Thanks for all the input. Right now, I'm reading Perl. Also, I have a question; Is Perl the language to go when you are working in a cisco environment.
    David G.
    http://gomezd.com <
    My Tshoot test Blog
    http://twitter.com/ipnet255
  • ixg123ixg123 Member Posts: 15 ■□□□□□□□□□
    Sorry, I know that this sounds harsh but your last question really suggests that the role of Perl is a little beyond your current understanding. There has been a lot of development with Perl for a whole range of different applications. If you were to search for "Perl Cisco" you'll find that there are quite a lot of matches specific to the use of Perl of configuring/managing Cisco switches/routers.

    However - depending upon your application and the platforms available to you - can I suggest that you do yourself a really big favour by checking out Rancid (www.shrubbery.net/rancid). This fantastic package allows you go get your configurations and will store them in a database. As changes are made it will also allow you to track them ... making it possible to go back to the config 3 weeks ago when everything "worked". As an extension, it will also allow you to create "scripts" (lists of CLI commands) that can be run against "all core switches" or "all Joes's routers".

    There's no point in reinventing the wheell if you don't need to and, for backups of Cisco configs, there really should be no need to!!!

    Kind regards
  • amb1s1amb1s1 Member Posts: 408
    Hey ixg123, I understand what you are saying. I'm looking for something like rancid, but I the same time I would like to understand perl. Everything that will help me to have a better knowledge is a plus to me.
    David G.
    http://gomezd.com <
    My Tshoot test Blog
    http://twitter.com/ipnet255
  • ixg123ixg123 Member Posts: 15 ■□□□□□□□□□
    No problem. A good understanding of Perl will allow you to do so much more than you can really imagine, it's an incredible language that has had substantial investment from a very wide user base. If this is the way that you want to go then the "best" approach would probably be to split your focus a little. Get a basic understanding of what Perl does, and how it works then search for the Cisco modules that do what you are looking for. Use the "documentation"/ or examples to install the modules and then get them working in your environment ... then look to customise what they do to meet exactly your needs - this will then force you back to the manuals with a purpose!

    I'd still recommend taking a look if RANCID can't give you a better starting position though. It's already stable and is in use in a huge number of networks around the globe. Using your developing knowledge of Perl you would have the ability to take the information collected and process/format it into whatever form you choose.

    Oh, if you're getting into programming "languages", you might also want to take a look at Ciscos implementation of TCL ... which will allow you to run scripts directly at the switch/router.

    http://www.cisco.com/en/US/docs/ios/12_3t/12_3t2/feature/guide/gt_tcl.html
Sign In or Register to comment.