Community discussions

MikroTik App
 
SaLIk
just joined
Topic Author
Posts: 3
Joined: Wed Apr 22, 2020 6:15 am

bug in export/import settings over API

Fri Apr 24, 2020 10:23 am

RouterBOARD LHG 5nD
Firmware: 6.45.5

1) export settings:
/export
=terse=true
=file=backup.rsc
2) add 15 s delay on the first line of "backup.rsc" and save it into "flash/backup.rsc"

3)import settings:
/system/reset-configuration
=no-defaults=yes
=skip-backup=yes
=run-after-reset=flash/backup.rsc


ERROR ->
script,error script error: expected yes or no (line 9 column 58)

Preview of the script exported over API:
# apr/24/2020 08:26:04 by RouterOS 6.46.5
# software id = NE5Z-TM3X
#
# model = RouterBOARD LHG 5nD
# serial number = 6F658784A32A
/interface wireless set [ find default-name=wlan1 ] band=5ghz-a/n channel-width=20/40mhz-XX frequency=auto ssid=MikroTik
/interface list add comment=defconf name=WAN
/interface list add comment=defconf name=LAN
/interface wireless security-profiles set [ find default=true ] supplicant-identity=MikroTik
/ip pool add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server add address-pool=default-dhcp disabled=false interface=ether1 name=defconf
/ip neighbor discovery-settings set discover-interface-list=LAN
/interface list member add comment=defconf interface=ether1 list=LAN
/interface list member add comment=defconf interface=wlan1 list=WAN
/ip address add address=192.168.88.1/24 comment=defconf interface=ether1 network=192.168.88.0
....



When the same command is called over terminal
/export terse file=backup.rsc
export file looks good and the settings imports with succes.


Preview of the script exported over terminal (telnet):
# jan/02/1970 00:01:41 by RouterOS 6.46.5
# software id = NE5Z-TM3X
#
# model = RouterBOARD LHG 5nD
# serial number = 6F658784A32A
/interface wireless set [ find default-name=wlan1 ] band=5ghz-a/n channel-width=20/40mhz-XX frequency=auto ssid=MikroTik
/interface list add comment=defconf name=WAN
/interface list add comment=defconf name=LAN
/interface wireless security-profiles set [ find default=yes ] supplicant-identity=MikroTik
/ip pool add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server add address-pool=default-dhcp disabled=no interface=ether1 name=defconf
/ip neighbor discovery-settings set discover-interface-list=LAN
/interface list member add comment=defconf interface=ether1 list=LAN
/interface list member add comment=defconf interface=wlan1 list=WAN
/ip address add address=192.168.88.1/24 comment=defconf interface=ether1 network=192.168.88.0


I was hoping the api would be the best way to manage mikrotik devices but this is unusable.

Who is online

Users browsing this forum: No registered users and 37 guests