Community discussions

MUM Europe 2020
 
User avatar
Edoras
newbie
Topic Author
Posts: 32
Joined: Wed Apr 05, 2006 12:03 am
Location: Prague, Czech rep.

Automatic undo configuration, if is not commited in time lim

Tue Jul 17, 2007 10:33 pm

Is it possible to switch mikrotik in some "special safe mode", where changes must be commited untill some time? If changes will be not commited in time, all changes will be rolls back.
I know how clasic safe mode works, but is is not usable for configurations, where session is lost during configuration. For example I need it now for switching wireles network cards from normal AP-client mode to nstreme-dual. If I will do any mistake on the remote side, it will be not possible to connect there again. It would be very helpful, if the remote system will be automaticly switched back in "AP" mode, if I will be not able to connect there to commit changes.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24375
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Automatic undo configuration, if is not commited in time lim

Wed Jul 18, 2007 10:34 am

that is exactly what "safe mode" (ctrl+x) does. If connection is lost, it restores the settings you just changed.
 
cmit
Forum Guru
Forum Guru
Posts: 1552
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Re: Automatic undo configuration, if is not commited in time lim

Wed Jul 18, 2007 10:59 am

Normunds, I was about to post the same reply, but then realized that's exactly what he NOT wants ;-)

As I understood, he wants something like Ci$co does: Config changes are in RAM, and you only write them to flash (permanently) with a dedicated command. And then an option to undo changes after a certain time. This is possible in Ci$co - but I haven't had my hands on it for years, so can't remember exactly. It was something like "load the old config from flash in 5 minutes" and you had the chance to cancel that scheduled loading of the config with another command.

Problem he is facing is: He is doing changes, that WILL (intentionally) break his connection. So safe-mode would ALWAYS roll-back all changes. He wants to change things (breaking his connection), and then manually commit those changes (after changing the other end of the link in his case and connecting again). If changes are not committed in a (configurable?) timespan, ONLY THEN they should be rolled back.

Best regards,
Christian Meis
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Automatic undo configuration, if is not commited in time lim

Wed Jul 18, 2007 1:42 pm

sorry for being blunt, but why anyone would need that?

as i understand this:
1) i am netowrk administrator and i want to configure my router
2) so i connect to my router and make changes needed
3) i do not want to cut myself out so i can connect there and do adjustments again


but if i want to do something like that, then i create a script that does that for me and script that undoes that for me in time i set it to do that in scheduler.
 
cmit
Forum Guru
Forum Guru
Posts: 1552
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Re: Automatic undo configuration, if is not commited in time lim

Wed Jul 18, 2007 2:49 pm

There are some arguments FOR such a feature I can see:

- Creating scripts to do the job (and revert the settings automatically) is not everyones darling. (Amongst others because you don't have ANY debugging possibilities for scripting in RouterOS; and often you don't have to capacities/hardware/time to build a similar lab environment to test things out before doing that "live").
- For simple changes, creating scripts is just ridiculously necessary work.
- As a last resort this feature could also be helpful: If you have configured your RouterOS so it's completely dead (i.e. not reachable anyhow), a simple reboot would fix things (because the saved, good config from flash would be loaded again). And this reboot could be done by someone without any knowledge of RouterOS (pulling a plug is easy; having someone at the routers' location to reconfigure the router via serial console will need some knowledge). Or you could have a remote-controlled power-switch at the location and just remotely power-cycle the router.

So: Yes, you could do this using scripts. But having this option wouldn't hurt, and could be helpful in some situations...

Best regards,
Christian Meis
 
User avatar
Edoras
newbie
Topic Author
Posts: 32
Joined: Wed Apr 05, 2006 12:03 am
Location: Prague, Czech rep.

Re: Automatic undo configuration, if is not commited in time lim

Tue Aug 07, 2007 5:02 pm

I solved that by folowing way:

1. I made backup of RouterOS (system backup save name="backup1")
2. I made new script called "restore", which contains one command: system backup load name="backup1"
3. I created scheduler (system/scheduler) for automatic start the "restore" script. Start time of the script I moved manually during my work every 10 minutes to (actual time)+15min . If my connection would be lost, the old configuration would be restored by the script in few minutes.

Thanks for your help.

Jirka
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24375
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Automatic undo configuration, if is not commited in time lim

Tue Aug 14, 2007 9:49 am

how about a timer setting for the safe mode? if connection doesn't come up in x-seconds, undo last changes?
 
harrysuccess
just joined
Posts: 8
Joined: Mon Oct 04, 2010 5:23 am

Re: Automatic undo configuration, if is not commited in time

Wed Jul 10, 2013 1:16 am

where can I setting the timer safe mode?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24375
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Automatic undo configuration, if is not commited in time

Wed Jul 10, 2013 11:26 am

where can I setting the timer safe mode?
there is no such option.
No answer to your question? How to write posts

Who is online

Users browsing this forum: chuckt and 16 guests