copy startup-config running-config ??? Why is this command not used.

Discussion in 'Cisco' started by ciscopimpenator, Apr 1, 2007.

  1. Cisco doesn't recommend copying startup configuration files from NVRAM
    to an active configuration in RAM. They claim the files "merge" and
    the start doesn't replace the running file. This is assuming the
    router has already booted/loaded and you are playing around with the
    configurations. They recommend reloading the router. They say the
    copy command doesn't erase the active config and replace it with the
    startup config.

    My question is why? Most of the time you use the copy command it
    erases the preexisiting desitination config file.

    Why won't it work in this case???

    Thank you!
    ciscopimpenator, Apr 1, 2007
    1. Advertisements

  2. ciscopimpenator

    Mike Dorn Guest

    You can certainly copy from nvram to running-config and it can be quite useful,
    but it doesn't work the same as copying in the other direction. The simplest
    way to understand it is that it isn't really a "copy" at all. When you copy to
    nvram or flash, you're creating a new file and writing content to it. When
    you're done, the file only contains what you just wrote to it. Thus, if you did
    "copy run start", you have a complete copy of your config, and nothing more.

    When you "copy" to running-config, this isn't really a file-creation operation.
    Instead, you're pushing text from the source file into the front-end parser of
    the running system, one line at a time, JUST AS IF YOU'D TYPED IT IN AT CONFIG
    T. Everything that's copied from the file becomes part of the running config
    (as long as it doesn't contain errors), but the running config may still contain
    many items that were already in it before the "copy" began--anything that wasn't
    explicitly changed by the text copied in. This is what Cisco means when they
    say it is "merged".

    One handy use for copying from nvram to running-config is for making major
    structural changes to the router interface or switchport that you're talking on.
    If you were to key the commands in one line at a time with "config t", you'd
    likely reach a point where you lose connectivity, the next line is never
    received, and you're stuck making a field trip to finish the job. Instead, you
    can place your entire change in a little file "changes.txt", put a copy of it on
    your tftp server, and "copy tftp nvram:" to get it onto your device. Then "copy
    nvram:changes.txt running-config" to apply all the changes at once, without
    getting interrupted in the middle.

    You can also use "copy startup-config running-config" to load up the config on a
    router that you initially booted with the config register set to skip the
    config. You might need to do this if you lost the enable password. Remember,
    however, that you'll need to go thru and fix all your interfaces, because Cisco
    defaults "shutdown" differently during the initial load than during subsequent
    Mike Dorn, Apr 1, 2007
    1. Advertisements

  3. Great explanations!

    Hopefully I will remember these details.

    ciscopimpenator, Apr 1, 2007
  4. The explanation in the Cisco CCNA book is absolutely terrible!
    ciscopimpenator, Apr 1, 2007
  5. ciscopimpenator

    Bod43 Guest

    Thanks for that. Not one I have noticed.
    I did consider recently tftping the whole startup off and on
    then "copy start run" to get just this effect
    but I decided it was too scary.

    Also - on many (most now) platforms you can
    "copy tftp flash:" to get it onto your device. Then "copy
    flash:changes.txt running-config"

    Hmm. I had always wondered what the nvram: file
    system was for.

    That is VERY handy.
    Bod43, Apr 2, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.