Networking-Forums.com

Professional Discussions => Routing and Switching => Topic started by: konabiker153 on September 08, 2016, 06:41:29 AM

Title: Hello and a question :) Cisco configure replace command
Post by: konabiker153 on September 08, 2016, 06:41:29 AM
Hi all,

Been working with a spare switch and managed to get the above command set to work ok but cant figure out how to stop the archive I create being over written.  Essentially I understood the function was to allow me to archive a working config and then restore it if I make a mess of the config at some point.  If all the archived configs are overwritten every 10 minutes or so, there will never be a useful copy of my config to restore. I know I can store a copy offline but that defeats the purpose of the archive does it not??

Thanks for any comments!!
Title: Re: Hello and a question :) Cisco configure replace command
Post by: wintermute000 on September 08, 2016, 06:46:55 AM
I assume you're talking about the archival function, not configure replace itself.
You don't have to specify a timer to overwrite every 10 minutes, you can create the archives manually.
Title: Re: Hello and a question :) Cisco configure replace command
Post by: konabiker153 on September 08, 2016, 06:51:27 AM
Thanks for the quick reply!  I was following the Cisco documentation but will have a look at how to create a manual archive set in that case.
Title: Re: Hello and a question :) Cisco configure replace command
Post by: Dieselboy on September 08, 2016, 08:22:53 PM
If you get stuck OP post back here with references to the guide you're following, what commands you're entering and what you expect to happen compared to what is actually happening and we'll try and help figure it out with you.
Title: Re: Hello and a question :) Cisco configure replace command
Post by: konabiker153 on September 09, 2016, 07:24:57 AM
Thanks Dieselboy,

I was just following this:
http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/config-mgmt/configuration/xe-3s/config-mgmt-xe-3s-book/cm-config-rollback.html

It seems to work ok but for what ever reason, when I demoed it to a manager, the restore wiped the config back to the switch default. Thankfully it was only a test switch.  Will keep testing and see how it goes.
Title: Re: Hello and a question :) Cisco configure replace command
Post by: Dieselboy on September 12, 2016, 02:24:28 AM
Two things,

I notice this:
Quote
If the configuration rollback capability is desired, you must save the Cisco IOS running configuration before making any configuration changes. Then, after entering configuration changes, you can use that saved configuration file to roll back the changes (using the configurereplace target-url command). Furthermore, since you can specify any saved Cisco IOS configuration file as the replacement configuration, you are not limited to a fixed number of rollbacks, as is the case in some rollback models based on a journal file.

And are you using an IOS-XE device?

I have done this before on IOS but in my experience it was never 100% fool proof. I didn't spend the time to figure out why, though. These days I have done a periodic archive to flash: after each config change, I have also set up RANCID to periodically copy running configs into a repository that allows you to keep an off-box archive with the ability to compare configs with previous ones. RANCID needs SSH access to all the devices, though.