Community discussions

MikroTik App
 
jamecollins
just joined
Topic Author
Posts: 18
Joined: Tue Apr 11, 2017 1:00 pm

How to reset-configuration command with script

Thu May 11, 2017 5:57 am

Hi everyone, I have try to run script to reset-configuration and load config from exits backup file. But I see that don't work. I think because when using /system rest-configuration command, the RouterOS confirm that action, like that

[admin@MikroTik] > /system reset-configuration keep-users=yes no-defaults=yes run-after-reset=flash/nhan02.rsc
Dangerous! Reset anyway? [y/N]:

How to bypass press Y to continue this action.
Thanks for your support.
 
duleorlovic
just joined
Posts: 2
Joined: Mon Feb 26, 2018 12:42 pm

Re: How to reset-configuration command with script

Fri Mar 02, 2018 3:52 pm

I managed to bypass this prompt using ftp and automatic import
https://wiki.mikrotik.com/wiki/Manual:C ... tic_Import

So my script (that contains
/system reset-configuration
was renamed to
my_script.auto.rsc
.

Once I upload using ftp it will reset without any question :)