...
For example export configuration from /ip address
menu and save it to file:
Code Block | ||||
---|---|---|---|---|
| ||||
[admin@MikroTik] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.1.0.172/24 10.1.0.0 10.1.0.255 bridge1
1 10.5.1.1/24 10.5.1.0 10.5.1.255 ether1
[admin@MikroTik] > /ip address export file=address
[admin@MikroTik] > /file print
# NAME TYPE SIZE CREATION-TIME
0 address.rsc script 315 dec/23/2003 13:21:48
[admin@MikroTik] >
|
By default export command writes only user edited configuration, RouterOS defaults are ommittedomitted.
For example, Ipsec dfault default policy will not be exported, and if we chane change one property then only our change will be exported:
Code Block | ||||
---|---|---|---|---|
| ||||
[admin@rack1_b4] /ip ipsec policy> print
Flags: T - template, X - disabled, D - dynamic, I - inactive, * - default
0 T * group=default src-address=::/0 dst-address=::/0 protocol=all
proposal=default template=yes
[admin@rack1_b4] /ip ipsec policy> export
# apr/02/1970 17:59:14 by RouterOS 6.22
# software id = DB0D-LK67
#
[admin@rack1_b4] /ip ipsec policy> set 0 protocol=gre
[admin@rack1_b4] /ip ipsec policy> export
# apr/02/1970 17:59:30 by RouterOS 6.22
# software id = DB0D-LK67
#
/ip ipsec policy
set 0 protocol=gre |
Notice the * flag, it indicates that entry is system default and cannot be removed manually.
Here is the list of all menus containig containing default system entries
Menu | Default Entry |
---|---|
/interface wireless security-profiles | default |
/ppp profile | "default", "default-encryption" |
/ip hotspot profile | default |
/ip hotspot user profile | default |
/ip ipsec policy | default |
/ip ipsec policy group | default |
/ip ipsec proposal | default |
/ip ipsec mode-conf | read-only |
/ip smb shares | pub |
/ip smb users | guest |
/ipv6 nd | any |
/mpls interface | all |
/routing bfd interface | all |
/routing bgp instance | default |
/routing ospf instance | default |
/routing ospf area | backbone |
/routing ospf-v3 instance | defailt |
/routing ospf-v3 area | backbone |
/snmp community | public |
/tool mac-server mac-winbox | all |
/tool mac-server | all |
/system logging | "info", "error", "warning", "critical" |
/system logging action | "memory", "disk", "echo", "remote" |
/queue type | "default", "ethernet-default", "wireless-default", "synchronous-default", "hotspot-default", "only-hardware-queue", "multi-queue-ethernet-default", "default-small" |
...
For example load saved configuration file
Code Block | ||||
---|---|---|---|---|
| ||||
[admin@MikroTik] > import address.rsc
Opening script file address.rsc
Script file loaded and executed successfully
[admin@MikroTik] > |
Import command allows to specify following parameters:
...
This command clears all configuration of the router and sets it to the factory defaults including the login name and password ('admin' with empty password). For more details on default configurations see the list.Note:
After configuration reset command is executed router will reboot and load default configuration.
Tip |
---|
Backup file of existing configuration is stored before reset. That way you can easily restore any previous configuration if reset is done by mistake. |
...
Warning |
---|
If the router has been installed using Netinstall and had a script specified as the initial configuration, the reset command executes this script after purging the configuration. To stop it doing so, you will have to reinstall the router. |
It is possible to override default reset behavior with parameters below:
...
For example hard reset configuration without loading default config and skipping backup file:
Code Block | ||||
---|---|---|---|---|
| ||||
[admin@MikroTik] > /system reset-configuration no-defaults=yes skip-backup=yes
Dangerous! Reset anyway? [y/N]: y |
And the same using Winbox:
...