Capturing and storing a copy of a router's running configuration provides a backup for recovery, auditing, or replication to another device. This process uses PuTTY's session logging feature to export the configuration output to a local file.
Capturing Config Copies
We've in the past already learned how to save the configs so that way, when the device is restarted, it will come up with the running config once again. However, in this case right here, what we're saying is, let's say we want to store a copy of the configuration just in case something goes wrong, or perhaps we want to copy the configuration to another device. There's multiple reasons why we would want the actual configuration file.
One of the easiest ways to do that is right through your console cable, or your console port. What we're going to do inside PuTTY is click on the icon in the upper left hand corner and say change settings. Then we're going to click on logging, and we're going to click printable output. What this will do then is, whenever we type something in, we will actually get a log of this.
I'm going to put it onto the desktop, so I'll browse to the desktop here. In fact, I'm going to make a folder, and we're going to just call this folder "configs", and we're going to put all of our configs in there. I'm going to open that up, and we'll call this — we'll call it "router config". Usually what I like to do with these also is to put a date, so I have a general date of when it is. I always put the year first, and then the month, then the day, so that way it's easily sortable. Then I will click on save right there, then I click apply, and now anything that I output will go into that file. That can be really handy when you're keeping track of what it is that you've done, what it is that you're accomplishing, so that's a good way to track that.
In this case right here, I just want to save the config, so I'm going to do "show run" right here, hit enter, and then go through here, and it's capturing all that data.
Once I'm done, I can go back into change settings and turn that back off, so I'm going to do "none", hit apply. And then if I go into the configs, there it is right there.
So then I can open this up, and I'm going to choose Notepad to open this up, and there it is — this is a copy of the configuration. Now, you will notice that it has these "more" statements in here, and I don't want those "more" statements. That is from when you have to hit the space bar to continue on. So I'm going to copy this and I'm going to do a replace, and I want to replace that with nothing. So, find next — yep, these are what I want — I'll just replace all, and there we have it. Now this is a fairly clean version of the show running config, so you can go through here and see all the configurations.
And now I have saved this document — in fact, actually, I've made a couple of changes, I guess — so now I have saved it and closed it out, and now I have a copy.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →