Community discussions

MikroTik App
 
Toby7
Member Candidate
Member Candidate
Topic Author
Posts: 100
Joined: Thu Jan 05, 2012 12:53 am

Import config on RouerOS 6.42.7 stops

Sun Sep 02, 2018 4:22 pm

Hi,

I have problems importing an RouterOS configuration from ROS 6.42.7. This config was running on a RB750GL and there I saw some strange errors so I wanted to reinstall the router from sratch.
At first I did a "export compact" to save the config. Then I used netinstall to reinstall the RouterOS 6.42.7 with default config.

After that I reset everything using "system reset-configuration no-defaults=yes". Now when I login again I wanted to import my backup config.
Executing "import test.rsc verbose=yes" fails at the last line:
/interface bridge
add admin-mac=00:0C:42:C1:F9:9D auto-mac=no comment=\
    "created from master port" name=bridge1 protocol-mode=none
/interface ethernet
set [ find default-name=ether1 ] name=ether1_trunk
set [ find default-name=ether2 ] name=ether2_trunk_out
set [ find default-name=ether3 ] name=ether3_Heimnetz
set [ find default-name=ether4 ] name=ether4_SmartHome
set [ find default-name=ether5 ] name=ether5_IPv6
/interface vlan
add interface=bridge1 loop-protect-disable-time=0s \
    loop-protect-send-interval=00:00:01s name=vlan1_Heimnetz vlan-id=1
add interface=bridge1 loop-protect-disable-time=0s \
    loop-protect-send-interval=00:00:01s name=vlan100_GuestWLAN vlan-id=100
add interface=bridge1 loop-protect-disable-time=0s \
    loop-protect-send-interval=00:00:01s name=vlan200_FreyPV vlan-id=200
add interface=bridge1 loop-protect-disable-time=0s \
    loop-protect-send-interval=00:00:01s name=vlan300_Test vlan-id=300
add interface=bridge1 loop-protect-disable-time=0s \
    loop-protect-send-interval=00:00:01s name=vlan400_SmartHome vlan-id=400
add interface=bridge1 loop-protect-disable-time=0s \
    loop-protect-send-interval=00:00:01s name=vlan500_IPv6 vlan-id=500
/interface ethernet switch port
set 0 default-vlan-id=0 vlan-header=add-if-missing vlan-mode=secure
set 1 default-vlan-id=1 vlan-header=always-strip vlan-mode=secure
set 2 default-vlan-id=400 vlan-header=always-strip vlan-mode=secure
set 3 default-vlan-id=500 vlan-header=always-strip vlan-mode=secure
set 4 default-vlan-id=0 vlan-header=add-if-missing vlan-mode=secure
set 5 default-vlan-id=0 vlan-header=add-if-missing vlan-mode=secure
/interface list
add name=winboxList
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=3des
/snmp community
set [ find default=yes ] addresses=0.0.0.0/0
/interface bridge port
add bridge=bridge1 interface=ether1_trunk		# FAILING HERE
add bridge=bridge1 interface=vlan1_Heimnetz
add bridge=bridge1 interface=ether2_trunk_out
add bridge=bridge1 interface=ether3_Heimnetz
add bridge=bridge1 interface=ether4_SmartHome
add bridge=bridge1 interface=ether5_IPv6
....


Whats going on here? I mean I am importing the file I have just backuped?! I should under no circumstances fail to be imported :shock:
Now I am afraid I any of my dozen Mikrotiks failing, even with having the config :(

The execution of the import fails and I am disconnected by winbox and not able to reconnect at all. Only netinstall helps.
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 631
Joined: Fri Apr 30, 2010 3:25 pm
Location: Laval, QC, Canada
Contact:

Re: Import config on RouerOS 6.42.7 stops

Sun Sep 02, 2018 4:33 pm

Hello

I have not experienced this issue but I'd like to say that if you are using export as a means of backing up your routers, you're headed for disaster.

You need to do a binary backup which is a real backup. Passwords and all.

Should you loose a router, as long as it's not totally defective, you can restore the full config with the binary file, thing you can't do with an export. Although not recommended, you can use one router's binary backup and restore it in another of SAME model, but you'll have to reset mac addresses for ALL interfaces.

Regards,


Sent from Tapatalk

___________________________
Alain Casault, Eng.
If I helped you, let me know!
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 631
Joined: Fri Apr 30, 2010 3:25 pm
Location: Laval, QC, Canada
Contact:

Re: Import config on RouerOS 6.42.7 stops

Sun Sep 02, 2018 4:35 pm

Edit: system backup save name=ABC


Sent from Tapatalk

___________________________
Alain Casault, Eng.
If I helped you, let me know!
 
Toby7
Member Candidate
Member Candidate
Topic Author
Posts: 100
Joined: Thu Jan 05, 2012 12:53 am

Re: Import config on RouerOS 6.42.7 stops

Sun Sep 02, 2018 4:57 pm

Well I have a binary backup but I thought it is better to just import the config so that any side effects regarding configuration are gone. For me a import script is like setting up the device from the beginning.
For me a device independent script should be more reliable in case of disaster recovery, but it seems I am wrong. :( Even the MikroTik support advised me to do so.
Is there any chance to get this script imported? I am missing a way to debug the import.
 
proximus
Member Candidate
Member Candidate
Posts: 113
Joined: Tue Oct 04, 2011 1:46 pm

Re: Import config on RouerOS 6.42.7 stops

Sun Sep 02, 2018 5:04 pm

Copy-and-paste into terminal one section at a time.
 
Toby7
Member Candidate
Member Candidate
Topic Author
Posts: 100
Joined: Thu Jan 05, 2012 12:53 am

Re: Import config on RouerOS 6.42.7 stops

Sun Sep 02, 2018 5:09 pm

I will try it but its no good solution for being in hurry when you have to replace an existing router :lol:
 
proximus
Member Candidate
Member Candidate
Posts: 113
Joined: Tue Oct 04, 2011 1:46 pm

Re: Import config on RouerOS 6.42.7 stops

Sun Sep 02, 2018 5:30 pm

Copy-and-paste into terminal one section at a time.
Also .. Do each section in Safe Mode. Once that section is successfully entered, exit Safe Mode to save it. Then do the next section.

That way you don't have to start from scratch each time, if it blows up. And you'll know exactly where the problem is.
 
Toby7
Member Candidate
Member Candidate
Topic Author
Posts: 100
Joined: Thu Jan 05, 2012 12:53 am

Re: Import config on RouerOS 6.42.7 stops

Sun Sep 02, 2018 6:56 pm

good idea :D
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 631
Joined: Fri Apr 30, 2010 3:25 pm
Location: Laval, QC, Canada
Contact:

Re: Import config on RouerOS 6.42.7 stops

Mon Sep 03, 2018 12:00 am

Well I have a binary backup but I thought it is better to just import the config so that any side effects regarding configuration are gone. For me a import script is like setting up the device from the beginning.
For me a device independent script should be more reliable in case of disaster recovery, but it seems I am wrong. :( Even the MikroTik support advised me to do so.
Is there any chance to get this script imported? I am missing a way to debug the import.
Import scripts are good templates to configure many devices. Just change a few parameters and voilà. Unless I misread, you spoke of config restore, which is the purpose of binary backups.

Not sure what you mean by side effects of full config since pretty much everything you type in has an effect, because why do it if it doesn't do anything right? :D

Cheers

Sent from Tapatalk

___________________________
Alain Casault, Eng.
If I helped you, let me know!
 
Toby7
Member Candidate
Member Candidate
Topic Author
Posts: 100
Joined: Thu Jan 05, 2012 12:53 am

Re: Import config on RouerOS 6.42.7 stops

Tue Sep 04, 2018 5:12 pm

OK importing the backup was successful. So far so good.

The wiki recommends to do a netinstall when "device is not working properly". Well I did so and my issues regarding winbox still persist.
https://wiki.mikrotik.com/wiki/Manual:Netinstall
So is importing the config as backup the better way to do a deep device reset or should I use the line by line copy past action? What do you recommend?
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 631
Joined: Fri Apr 30, 2010 3:25 pm
Location: Laval, QC, Canada
Contact:

Re: Import config on RouerOS 6.42.7 stops  [SOLVED]

Tue Sep 04, 2018 7:39 pm

I actually do both. I'll use the backup for simple restores, after a test for example, when I change the setup drastically. Just make sure the backup is good by testing it once in a while ;)

If the device really crashed or I'm replacing it with a different model, then the export and line by line approach is required. And don't forget to redo admin/password. It doesn't get exported.

Sent from Tapatalk

___________________________
Alain Casault, Eng.
If I helped you, let me know!
 
Toby7
Member Candidate
Member Candidate
Topic Author
Posts: 100
Joined: Thu Jan 05, 2012 12:53 am

Re: Import config on RouerOS 6.42.7 stops

Wed Sep 05, 2018 11:29 pm

Thanks a lot for your information!
 
changeip
Forum Guru
Forum Guru
Posts: 3815
Joined: Fri May 28, 2004 5:22 pm

Re: Import config on RouerOS 6.42.7 stops

Wed Sep 05, 2018 11:48 pm

im sure you are getting disconnected when you put that interface into the bridge. Wrap the entire script with { } and it wont execute until the last line is pasted in ... sometimes that helps.
Colo and Wholesale Bandwidth Available! Sales at SanDiegoBroadband dot com

Who is online

Users browsing this forum: Bing [Bot], bsafarli, eworm, samasd, sindy and 72 guests