cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1076
Views
0
Helpful
9
Replies

configure replace every 2 hours

Hi,

I have just learnt that you can schedule a reload with the command "reload in [minutes]" to perform a reload some minutes later, and I was wondering if there is also a way to schedule the "configuration replace" command to get back to your old configuration file some minutes later.

Kind Regards,

1 Accepted Solution

Accepted Solutions

1) Yes you can save many files to nvram (the only limit will be the size of your free space in flash)

     Ideally if you are saving multiple configs its best to store them on a tftp server and not in the flash.

2) As for disabling the erase flash: , i dont think this is possible as its written in to the ios code.

View solution in original post

9 Replies 9

joelgooding
Level 1
Level 1

Not for Cisco. You can save the config and then make whatever changes you want and if you dont want those changes just revert to the startup config. Or just use the reload commanx you mentioned, esp if you are connecting remotely.


Sent from Cisco Technical Support Android App

Joel _______________________________ Please rate helpful posts and answered questions!

Hi joelgooding,

Thanks for your reply. I have a follow up question. Is there a way to load config file different from the starup-config file when booting up? This way it would be possible to revert to this file just in case we do something wrong and we save it by mistake.

Kind Regards,

The router will always look for the startup-config file

What you can do (If you want to save multiple instances of config in the flash memory)

is type

R1# Copy running-config flash:(Type name of what you want to save the config to eg pre-eigrp-config)

R1# Copy running-config flash:pre-eigrp-config

It will then prompt you to confirm filename  - Press enter

it will the prompt if you want to erase flash: Say N to this

Then it will copy the running config to flash:pre-eigrp-config

You can do this multiple times with different variants of your config

If you ever want to restore to a saved config

Simply type

Copy flash:pre-eigrp-config startup-config

and it will copy the old saved config back to startup-config

hope that helps!

Hi Vishal,

Thanks for your reply.

A couple of question come to my mind:

1. is is possible to save more than one file into the nvram? This way we could boot up from the startup-config file and have another one to revert to just in case we save the running-config by mistake.

2. each time you want to copy something in the flash memory you are prompted to erase the flash memory. It might happen to click yes by mistake and losing everything (even the scripts and the config-files stored in flash). So is there a way to disable that option every time you save into flash?

Kind Regards,

PEDRO

1) Yes you can save many files to nvram (the only limit will be the size of your free space in flash)

     Ideally if you are saving multiple configs its best to store them on a tftp server and not in the flash.

2) As for disabling the erase flash: , i dont think this is possible as its written in to the ios code.

Hi Vishal,

Thanks for your early reply. Regarding to it, I have some questions for you:

1. I understand that you can save any file to the nvram, as long as there is free space available. And to do this, you have to type the command:  "copy running-config nvram:myconfig"   in order to create a file called 'myconfig' into the nvram. Is this correct?

2. I also understand that if I want to go back to this configuration  at any given time I might type:  "configure replace nvram:myconfig" and automatically this configuration file will be loaded into the system. 

But I guess there must be a command to make the router start with this "myconfig" file stored in the nvram,  instead of doing it from the "startup-config" file stored also in the nvram.

I mean, a command similar to  "boot system"   but refered to configuration files, instead of IOS.  Have you ever heard of it?

Thanks in advance for your reply.

Kind Regards,

Abzal
Level 7
Level 7

Hi Pedro,

Have a look on this thread perhaps it is what are you looking for

https://supportforums.cisco.com/thread/2139458

Hope it will help.

Best regards,
Abzal

Hi Abzal,

Thanks for the link. I am going to have a look at it.

Kind Regards,

Hi Abzal,

The link was very interesting and I got some valuable info about EEM scripting, but I could not find exactly what I was looking for. One of the pieces that could be interesting is the eem script scheduling, which I am going to share with you.

   I have found a simple example to run a script every hour using cron:

event manager applet Script-every-2h

event timer cron name Test cron-entry "0 0-23/2 * * *"

action 1 syslog priority warnings msg "EEM runs every 2 hours"

   I have also found an eem script to be run 08 AM and 5 PM just monday to friday

event manager applet Script-in-and-out

event timer cron name Test cron-entry "0 7,20 * * 1-5"

action 1.0 syslog msg "Whatever actions you want!!!"

action 1.1 cli command "enable"

action 1.2 cli command "conf t"

............

I will keep trying.

Kind Regards,

Review Cisco Networking products for a $25 gift card