cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
877
Views
10
Helpful
7
Replies

9k restore backup configuration

adudek
Level 1
Level 1

I'm looking for the best way to restore a configuration to a nexus 9k, 93108YC, in a remote location without having to resort to a console connection.
All the instructions I've seen talk about doing a write erase then a reload which results in losing connectivity of the inband session.

I've been sort of successful in doing copy new-config startup-config and then reloading..

Currently scripting this with expect.  Looking if there is a better solution. 

The expect script doesn't reload everytime, it seems to be every other time but that is a different issue.

7 Replies 7

balaji.bandi
Hall of Fame
Hall of Fame
Currently scripting this with expect.  Looking if there is a better solution. 

better means with out rebooting the nexus switch like hotpatch config ?

The expect script doesn't reload everytime, it seems to be every other time but that is a different issue.

you expect to reload the device its not rebooting,  what different issues you see give some example.

also why are you looking to restore the config and why do you need to reboot the device?

https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-122-mainline/46741-backup-config.html

you can use diff command :

# show diff rollback-patch ?
checkpoint Use checkpoint as source configuration
file Src Checkpoint file
running-config Use running configuration as source
startup-config Use startup configuration as source

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hotpatch... Could be interesting..

The reason it isn't reloading everytime needs to be investigated deeper. I'm not seeing it on my 9kv.  See my response to @Richard Burts . His reasoning is correct.  

Sorry. Rebooting isn't an issue.  I liked in XR that one can do a config replace and was wondering if there was something I was missing on the nexus.

The original post asks a very open ended question "the best way to restore a configuration to a nexus 9k". If we knew more about the situation we could give better advice. Is this backup config the startup config? Is it some other config stored on the 9k? Is it a config stored on some device in the network?

If the requirement is to remove some recent config changes then the suggestion about rollback might be a very excellent suggestion. Otherwise the options would seem to be variations on the copy command (copy startup running, or copy tftp/ftp/scp/etc running). The really tricky part of this has to do with whether rebooting is required. BB asks "why do you need to reboot the device" and if we review the logic of the changes we can see why this is important. If we compare the actions when copying backup to startup line by line one of 3 conditions will exist:

1) the line exists in both the running and backup - the result is that the backup statement replaces the running statement.

2) the line exists in the backup but not in the running - the result is that the statement is inserted into the running.

3) the line exists in the running but not in the startup - the result is that the statement is still in the running. For example the running config has interface loopback1 but the startup does not. After copying the running config still has that interface.

So if we want to be sure that the backup is completely implemented without anything inherited from the running a reload needs to occur.

HTH

Rick

Understood.

Yes. periodically when we upgrade the system that the switch is part of, we are capturing the current configuration of the switch at that time for disaster recovery or reverting if something goes wrong. The tools I have ability to use is limited, ie not rancid.   I'm familiar with IOS and XR but the not so much with nexus.  Configs wont' change much on the switch but if someone adds something to the running config and saved it, then we are looking at the revert.  Local user knowledge/capability is unknown, probably low, so the idea is to minimize their involvement with managing the device.

The config is stored on a local server and your summation of the issues that I have seen is correct. Only startup config is stored on teh device.  We may do check pointing of config occasionally but the plan is not to store on the switch.

Do not want to merge configs, want to replace which is why I am looking at solution I am now.

I will have to investigate on how that is done but we currently want the config saved to a local server that is backed up.

Review Cisco Networking for a $25 gift card