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

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
copy startup-config running-config ??? Why is this command not used. ciscopimpenator@gmail.com 04-01-07
Posted by ciscopimpenator@gmail.com on April 1, 2007, 12:01 am
Please log in for more thread options
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!


Posted by Mike Dorn on April 1, 2007, 4:29 am
Please log in for more thread options
ciscopimpenator@gmail.com wrote:
> 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!
>
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
operations.


Posted by ciscopimpenator@gmail.com on April 1, 2007, 4:53 am
Please log in for more thread options
> ciscopimpena...@gmail.com wrote:
> > 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!
>
> 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
> operations.- Hide quoted text -
>
> - Show quoted text -

Great explanations!

Hopefully I will remember these details.

-Ciscopimpenator


Posted by ciscopimpenator@gmail.com on April 1, 2007, 5:08 am
Please log in for more thread options
The explanation in the Cisco CCNA book is absolutely terrible!



Posted by on April 2, 2007, 10:04 am
Please log in for more thread options
> ciscopimpena...@gmail.com wrote:
> > 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
<....>
> 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.

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.


Similar ThreadsPosted
copy command without confirmations May 2, 2007, 11:06 am
copy startup-config running-config ??? Why is this command not used. April 1, 2007, 12:01 am
command equivalent in PIX version 6.3 for the version 7.x command: same-security-traffic permit inter-interface December 11, 2006, 1:20 pm
Copy software from one PIX to another November 22, 2006, 5:07 am
Copy PIX Config November 29, 2006, 6:22 pm
Copy Config December 1, 2006, 7:02 pm
copy tftp ? October 15, 2007, 8:49 pm
copy config file September 29, 2006, 12:45 pm
2600 - Copy an IOS with xmodem March 13, 2008, 1:16 am
Cisco Router - COPY feature ?!?! August 16, 2005, 1:53 pm
REQ: DEMO copy of Call Manager v4.1 or better October 12, 2005, 1:23 pm
No copy tftp: flash: on 2503 November 25, 2005, 11:40 am
PIX: show / copy pre-shared key in plaintext November 7, 2006, 4:58 pm
do some cisco switches require "copy run start" September 10, 2005, 10:44 am
Perl Script to copy running config July 11, 2007, 2:28 pm