This may be a stupid question, but I am confused about something....
If I want to copy a config from a tftp server to a router with the "copy tftp start" command and save the destination file as startup-config, does the router erase the startup config first before importing the command lines?
I created a test file called "test" and there was one command on it: service nagle.
I wanted to see if it would leave the startup config intact and just add the service nagle command, but instead it wiped out the startup config and then added service nagle.
I did a "sh start" and it said "using 17 bytes out of 534,323 (or whatever number) and then "service nagle"...thats it. No startup config.
Of course I did this in a lab! :-)
So, what gives? I thought the "service nagle" command would be added and the startup config left intact. How do I prevent the startup config from getting blown out of the water?
the following config guide could be helpful
he router does not erase the existing running configuration before adding the commands. If a command in the copied configuration file replaces a command in the existing configuration file, the existing command will be erased. For example, if the copied configuration file contains a different IP address in a particular command than the existing configuration, the IP address in the copied configuration will be used. However, some commands in the existing configuration may not be replaced or negated. In this case, the resulting configuration file will be a mixture of the existing configuration file and the copied configuration file, with the copied configuration file having precedence.
So we have a doc that says that the resulting config should be the merge of old file and new file but this is not the case in your experiment.
May be the merge works when copying to the running config.
I remember a different behaviour depending on the destination file used:
copy tftp run
should merge the two and then you can save the resulting file
copying to the startup-config is a file overwrite/substitution
These two options should provide the flexibility to do what you want.
To protect : backup your config to a TFTP server ...
Hope to help