How to make a backup to a Cisco Router

Home Forums Networking Cisco Routers & Switches How-to How to make a backup to a Cisco Router

This topic contains 8 replies, has 4 voices, and was last updated by Avatar zanpakuto 12 years, 8 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • Avatar
    Billylook
    Member
    #118639

    Hi, I’m a begginner in this communication world. We have about 7 cisco router and I would like to have a copy of their configuration my my hard disk as a recovery process. they are up and ruuning , how do I copy their image.

    I will appreciate any tips about it !!

    Thanks

    Avatar
    daviddavis
    Member
    #263678

    Re: How to make a backup to a Cisco Router

    Billy,
    Here is a preview of an upcoming article on the Petri Cisco Knowledgebase. This should answer your question.

    Use TFTP to Backup your Cisco Router Configurations

    About the author:
    David Davis (CCIE #9369, CWNA, MCSE, CISSP, Linux+, CEH) has been in the IT industry for 15 years. Currently, he manages a group of systems/network administrators for a privately owned retail company and authors IT-related material in his spare time. He has written over fifty articles, eight practice tests and three video courses and has co-authored one book. His website is at http://www.happyrouter.com.

    Just like any important server on your network, Cisco routers and switches need to be periodically backed up. You don’t want your router to crash one day, get a replacement, and spend days trying to recreate the configuration file. To prevent this, make sure you backup your configurations with TFTP. Let’s find out how to do this.

    What is TFTP?
    TFTP stands for Trivial File Transfer Protocol. TFTP uses UDP, not TCP for transferring of files (like FTP does). Because it uses UDP and UDP is connectionless, TFTP file transfers are not meant for networks with a lot of latency, like the Internet. However, because UDP is doesn’t use any kind of acknowledgements, it is also faster than TCP.

    Obtaining a TFTP server
    You can make a Cisco router a TFTP server and copy files from other routers to that router. However, storing your backups on a router isn’t the best idea. You really want your Cisco device backups on a PC or server that can be backed up to tape. So, let’s find out how to obtain a Windows TFTP server.

    You can download a Windows TFTP server for free, from a variety of sources. Here are a couple of my favorites:
    • SolarWinds
    • Tftpd32

    In fact, Windows XP has a built in command-line TFTP program but I wouldn’t recommend it if you can obtain a free graphical program instead.

    Running a TFTP server
    Because I like the Tftpd32 program so much, let me show you how to use it.

    Step 1
    Download the latest version from this link-
    http://perso.wanadoo.fr/philippe.jounin/tftpd32.html#Versions

    Step 2
    Open the downloaded ZIP file. It should look like this:
    (see attached file)

    This is a small program and there is no installation. All you really need is the tftpd32.exe program. Right-click on that program and Copy it. Move to a folder or to your desktop and Paste the program in there.

    Step 3
    Run the program by double-clicking on it. It looks like this:
    (see attached file)

    Notice that it defaults to the directory that it was run in. If you want to create a new directory to store configuration in, you can do that. You would then change the current directory to that directory. That is the directory that all received configurations and IOS copies would be backed up into.
    Backing up your Router Configuration with TFTP
    Now that the TFTP server is running, go to the router that you want to backup the configuration from.

    Step 1
    Make sure that you can ping the IP address shown on the TFTP server application from the router. If you cannot, you have a networking issue and you need to resolve that before you continue.

    Step 2
    On the router’s console, type this:

    Router# copy running-config tftp

    Step 3
    When asked for the name of the TFTP server, type the IP address shown on the TFTP server console application, like this:

    Address or name of remote host []? 10.253.15.72

    Step 4
    When asked for the name of the destination file, you can take the default by pressing enter, like this:
    Destination filename [router-confg]? [press enter]

    You should see exclamation points scroll across the screen and a message that the file was copied, like this:

    !!!!!!!!!!
    44647 bytes copied in 1.692 secs (26387 bytes/sec)
    Router#

    You can also back up your router’s IOS file by using a command like this:
    copy flash:c3845-ipbase-mz.123-11.T7.bin tftp

    On the TFTP server console, you should see a record that the transfer completed, like this:
    (see attached file)


    Article Summary

    Here is what we have learned:
    • A TFTP server is a necessary tool that every administrator should use to periodically back up their Cisco router and switch configuration files and IOS files.
    • TFTP servers can be obtained for free
    • The copy command is used on the Cisco device to copy configuration and IOS files to the TFTP server

    Avatar
    Billylook
    Member
    #290637

    Re: How to make a backup to a Cisco Router

    Hi, Thanks a lot for you quick response, I’m printing your instruction and will test tomorrow. Appreciate your help in this matter !!!

    Many thanks again !!!

    Avatar
    Billylook
    Member
    #290638

    Re: How to make a backup to a Cisco Router

    Hi David;

    Running the command “copy running-config tftp” she created a file no extension and Type:File , 3KB

    but when running

    “copy flash:c3725-ik9o3s-mz.122.14.T1.bin” she created c3725-ik9o3s-mz.122.14.T1.bin file and Type:Bin, 17,852Kb

    Are these 2 files contain the same information? one is big and the other is very small

    Please Advice

    Note: I read other method using a terminal emulation program to backup a configuration using a command terminal length 0 / Transfer > Capture Text / Start ……….

    This method created a text file that I call config.txt of 3Kb

    Now I have a lot backup files but I do not know if all are the same , if not, which one to use to restore my router configuration

    Avatar
    theterranaut
    Member
    #285870

    Re: How to make a backup to a Cisco Router

    Hello Billy,

    (David, if you dont mind I’ll help on this one.)

    Billy, there are 2 main types of files from a router that you may want to back up.

    The first of these is the configuration, the details you supply to get the routerto do what you want.

    The second of these is the operating system file: the IOS.

    You said:


    Running the command “copy running-config tftp” she created a file no extension and Type:File , 3KB

    but when running

    “copy flash:c3725-ik9o3s-mz.122.14.T1.bin” she created c3725-ik9o3s-mz.122.14.T1.bin file and Type:Bin, 17,852Kb

    Are these 2 files contain the same information? one is big and the other is very small



    The first file you backed up was the config file. It is, as you say, very small. Just rename the file, add a ‘.txt’ extension, and it should be readable.

    The second file you backed up was the IOS. Its much bigger.

    FWIW- IOS is stored in ‘flash’ memory, config is stored in NVRAM (usually!)

    You also said:



    Note: I read other method using a terminal emulation program to backup a configuration using a command terminal length 0 / Transfer > Capture Text / Start ……….

    This method created a text file that I call config.txt of 3Kb

    Now I have a lot backup files but I do not know if all are the same , if not, which one to use to restore my router configuration



    Thats another way to backup your config. It works- but in practice, you are far better off with David’s method. The main reason for this is: any ‘secret’ passwords, keys, etc, survive tftp transfer in a readable form (mostly: this, I gather, is changing!) so tftp is the way to go: but also keep a separate file with your secret stuff: enable passwords, any crypto info, etc- elsewhere.

    BTW- if you go back and read David’s article, you’ll see he covers all of this, and describes exactly what is being backed up.

    regards

    theterranaut

    Avatar
    daviddavis
    Member
    #263692

    Re: How to make a backup to a Cisco Router

    Thanks Terranaut, I couldn’t have said it better!

    David

    Avatar
    Billylook
    Member
    #290639

    Re: How to make a backup to a Cisco Router

    Thank you David & Thetarranaut, I’d received a great advice and support !!

    Avatar
    theterranaut
    Member
    #285876

    Re: How to make a backup to a Cisco Router

    All DD’s work, cant take any credit, but thanks anyway-

    regards

    TT

    Avatar
    zanpakuto
    Member
    #292659

    Re: How to make a backup to a Cisco Router

    Hi, Thanks a lot for you tutorial, i now try backup my router…..

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘How to make a backup to a Cisco Router’ is closed to new replies.