Quick Save of Cisco IOS Running Config

I’ve seen Cisco support use this technique over the phone a few times and think it is useful enough to post here for quick reference.

The scenario is that you have terminal access (possibly via serial console) to a Cisco IOS router or switch, but you may not have easy IP access to transfer files. You need to make a quick copy of the running configuration to your local management PC disk for review, backup, etc. Here are some tips:

# terminal length 0
! -- configure putty to log printable output --
! -- under menu, change settings, session, logging --
! -- saving to a text file on the desktop --
# show run
! -- configure putty for *no logging* --
# terminal length 24
# show terminal
# exit

This should give you a quick text file copy of your device running configuration. Note that any encrypted or protected information that Cisco IOS does not show via “show run” will be missing. Other than that it should be a very useful backup of your config. 🙂

Linux users can use the “tee” command to log output of a terminal session. See the “log output of remote ssh session” blog entry over at rheladmin.blogspot.com for a good example.

The HP ProCurve / ProVision command for infinite terminal length is no page. Just for reference if you’re working on HP switches.

On Cisco WLC (Wireless Controller), use the commands config paging disable and config paging enable. View paging status with grep include paging "show run-config commands". Print running configuration to terminal with show run-config commands.

For Cisco ASA, use the commands terminal pager 0, show pager, and terminal pager 24. NOTE that show run will replace some sensitive items like IPSec pre-shared keys with ****. To see some of these items in plain-text, use more system:running-config and optionally pipe to begin or include to filter the results. Copies of the running config sent to flash or a file server will reveal these in plain-text as well.

For Brocade / Foundry FastIron Switches, use the commands skip and page to disable/enable pagination (scroll page-at-a-time, or entire document at once). This is documented on the FastIron Scroll control page.

If you’ve made changes to the configuration, don’t forget to save them to disk so your changes stay after a reboot. *Use the write mem command to make those changes permanent!

About notesbytom

Keeping technology notes on WordPress.com to free up my mind to solve new problems rather than figuring out the same ones repeatedly :-).
This entry was posted in Networking and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s