Community discussions

 
mynameisgreg
just joined
Topic Author
Posts: 5
Joined: Wed Jul 24, 2013 2:56 pm

importing and exporting config files

Wed Jul 24, 2013 10:30 pm

Excuse my first post. After a day of messing around I've got the two Omni's talking to each other and I can ping through both of them. The issue I'm running into is; I cannot load a config file from one Omni u-5HnD to another u-5HnD. Is there a way around this? or will each unit have to be programmed and backed up independently?
Thanks in advanced. Your wiki pages have been a huge help.

-Greg
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: importing and exporting config files

Thu Jul 25, 2013 12:01 pm

what problem exactly you have when you try to import/export and what RouterOS versions is this?
 
mynameisgreg
just joined
Topic Author
Posts: 5
Joined: Wed Jul 24, 2013 2:56 pm

Re: importing and exporting config files

Thu Jul 25, 2013 9:57 pm

RouterOS Version 6.0
When Export a config file from one Omni U-5HnD (A) then importing it into another Omni U-5HnD (B), the parameters do not change over. But I can reset configuration on the original Omni (A), and import the same backup file back into (A) and all of the parameters load fine. Is it something with my Backup procedure?

I ran into another issue. We are trying to bridge an Omni U-5HnD and an SXT 5HPnd as station bridges to an Omni U-5HnD setup as an AP bridge; we are using nv2 as well. When both are on and talking, the Omni that is set up as a station bridge gets its bridge port set to Backup Port. Is there a way around this?
 
mynameisgreg
just joined
Topic Author
Posts: 5
Joined: Wed Jul 24, 2013 2:56 pm

Re: importing and exporting config files

Fri Jul 26, 2013 3:38 pm

When I do a reset configuration in the Omni, it will set the IP to 0.0.0.0. When I load the backup file, the correct IP comes in, but the wireless settings are wrong, the SSID is from a very old configuration, the wireless is disabled and the bridge settings are off too. I'm going to have 30-40 of these to do, all of which will be remote. A working backup file is crucial.

please help.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24001
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: importing and exporting config files

Fri Jul 26, 2013 3:51 pm

you must use "/export compact file=name" command to export, then move the file "name.rsc" to the other, and run "/import name.rsc". This will work.

Backup files are not for moving config.
No answer to your question? How to write posts
 
mynameisgreg
just joined
Topic Author
Posts: 5
Joined: Wed Jul 24, 2013 2:56 pm

Re: importing and exporting config files

Fri Jul 26, 2013 4:32 pm

This is what I get after I try and import the .rsc file into the other omni. first I copied the file into "Files"



MMM MMM KKK TTTTTTTTTTT KKK
MMMM MMMM KKK TTTTTTTTTTT KKK
MMM MMMM MMM III KKK KKK RRRRRR OOOOOO TTT III KKK KKK
MMM MM MMM III KKKKK RRR RRR OOO OOO TTT III KKKKK
MMM MMM III KKK KKK RRRRRR OOO OOO TTT III KKK KKK
MMM MMM III KKK KKK RRR RRR OOOOOO TTT III KKK KKK

MikroTik RouterOS 6.0 (c) 1999-2013 http://www.mikrotik.com/

[?] Gives the list of available commands
command [?] Gives help on the command and list of arguments

[Tab] Completes the command/word. If the input is ambigous,
a second [Tab] gives possible options

/ Move up to base level
.. Move up one level
/command Use command at the base level
[rydmadmin@rccmwa01] > /import test1.rsc
Opening script file test1.rsc

Script file loaded successfullyfailure: already have device with such name

[rydmadmin@rccmwa01] >
 
mynameisgreg
just joined
Topic Author
Posts: 5
Joined: Wed Jul 24, 2013 2:56 pm

Re: importing and exporting config files

Mon Aug 12, 2013 4:30 pm

I am still having trouble with this. please help
 
Rudios
Forum Veteran
Forum Veteran
Posts: 966
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: importing and exporting config files

Wed Aug 21, 2013 8:53 am

Probably there are some configuration items in the rsc file which are already existing on the device where the import is done.
Best is to strip the rsc file and remove all unnecessary info (like /tool userman or /ip hotspot)
Also could be MAC address assignments. Strip these so that will be assigned automatically.
Testing setup with: 2 x RB750UP | 2 x RB750GL | 1 x RB951G-2HnD | 1 x RB2011UiAS-IN
 
gator
just joined
Posts: 4
Joined: Sat Jun 20, 2015 2:45 am

Re: importing and exporting config files

Mon Jun 22, 2015 4:29 am

bad english, sorry.

Hello! I'm newbe in ros

I have to move config from one RB2011UiAS-2HnD 3.22 6.29.1 to another, the same version etc = identical.
I can't to do it myself. backup files as I see there is not for move config... strange, but as is..
(what? I have backups and failed hw - restore on spare is impossible?
== I have no backups? is it joke?! headache...)
Ok, I try to /export verbose and /import.

[admin@a2] > import imp1.rsc
failure: already have device with such name

ok, that may be some devices etc exists, also described somewhere near...
try to /system reset, reboot, mac connect,
and again > import imp1.rsc

looks like it loaded, but devices\interfaces names shifted, on manner wlan1->wlan2, 2->3

= job totally failed, I bring my test router for spare, and move/restore config to spare failed,
what else can I do for 1:1 fully restore backups or rsc on the spare router?
should I do it manually, even with actual both types of backups? =\
I can't manually totally edit generated rsc scripts, too many new and strange options for me,
and builded config is very complex for start learn it just for/on time disaster recovery...

wtf? ros ubnormally/poorly works even base backup/restore operations...
(not beta or rc, release? hello, d-link!!! =)
Should I replace and don't to bay mikrotik in future?
Really sad. Really I'm idiot?
It was real fuckup...
sorry for emotions, but I can't stop.
 
User avatar
karlisi
Member Candidate
Member Candidate
Posts: 240
Joined: Mon May 31, 2004 8:09 am
Location: Latvia

Re: importing and exporting config files

Thu Jun 25, 2015 11:07 am

If you want to import exported configuration, you should do it on empty device - no default configuration when doing full reset.
/system reset-configuration no-defaults=yes
You shoudn't use backup/restore to transfer configuration to another device.
---
Karlis
 
gator
just joined
Posts: 4
Joined: Sat Jun 20, 2015 2:45 am

Re: importing and exporting config files

Fri Jun 26, 2015 11:13 pm

[quote="karlisi"]If you want to import exported configuration, you should do it on empty device - no default configuration when doing full reset.
/system reset-configuration no-defaults=yes
reboot

[admin@MikroTik] > import imp3.rsc
no such item (4)
[admin@MikroTik] >

what else items it wants?

versions of ROS and FW is the same, defaults not loaded,
what's goes wrong?
 
User avatar
karlisi
Member Candidate
Member Candidate
Posts: 240
Joined: Mon May 31, 2004 8:09 am
Location: Latvia

Re: importing and exporting config files

Mon Jun 29, 2015 9:30 am

All installed packages are the same?

Because import goes as scripted, row by row, i would check all settings, beginning from first line. Where configuration is not changed, carefully inspect your script. For me typically there was some settings for non defined item, i.e., make new DHCP server where IP pool settings are some rows below, so import can't assign this pool to DHCP server.
---
Karlis
 
User avatar
pukkita
Trainer
Trainer
Posts: 2979
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: importing and exporting config files

Mon Jun 29, 2015 10:10 am

Try resetting to no defaults again then load with
/import verbose=yes file-name=imp3.rsc
then you'll see more verbose errors. Most probably you're missing a package, or had enabled wireless driver on one rb and wireless-fp in the other.
Last edited by pukkita on Mon Dec 07, 2015 12:03 am, edited 1 time in total.
Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum
 
gator
just joined
Posts: 4
Joined: Sat Jun 20, 2015 2:45 am

Re: importing and exporting config files

Sun Nov 29, 2015 11:12 pm

hello!
yesterday I'm updated 2 pcs of RB2011UiAS-2HnD
from last post very much updates created,
may be backup\restore is became regular operation now?

both are identical, 3.44, 6.33.1 packet list are the same

I can't move config from one to another
1. by dump .backup file from first and restore on second
2. also, I can't do it even by
(1) /export file=cfg1
(2) /system reset-configuration no-defaults=yes
(2) reboot
(2) /import verbose=yes file-name=cfg.rsc

what else must I do to move config between 2 100%-identical routers?

when I try to restore by /import verbose=yes file-name=cfg.rsc
I see some conflicts, but not critical, like set mac to bridge, some LTE etc...
ok, that lines is not critical, # in script.

after that /import verbose=yes file-name=cfg.rsc again - without errors. Oh! Yes!
But nothing of firewall, NAT or Mangle rules is present,
and some another settigs are missed.

ok, open that script and copy-paste config by blocks to winbox-cli = ok
WTF$^$#^%#$^% !?


again, people, help me, pls?
1. how to move config between identical RB2011?
2. why I can't restore backup on another but identical device?
Why that way is not recommended? Seriousely, WHY?
3. why script from rsc do not full-restore config?
4. why lines copypasted from that script create config ok? what is difference?

bad english, sorry!
 
User avatar
pukkita
Trainer
Trainer
Posts: 2979
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: importing and exporting config files

Mon Nov 30, 2015 11:28 am

Backups are only valid for a given device with a given RouterOS and firmware versions. Backups are not intended for setup replication.

The problem you're facing could be the fact that those devices have wireless interfaces, whose driver takes a little to load when booting.

When doing a reset-configuration loading the .rsc file afterwards, first commands on the .rsc belong to wireless configuration, but the wireless device doesn't even exist for the OS, as the driver has not loaded yet, and fails.

When copying and pastingover a terminal the wireless driver has aready been loaded, that's why the import loads fine.

Try inserting a /delay 15 as the first command in the .rsc file and repeat the reset-configuration, it will work fine this time.
Last edited by pukkita on Mon Dec 07, 2015 12:03 am, edited 1 time in total.
Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum
 
gator
just joined
Posts: 4
Joined: Sat Jun 20, 2015 2:45 am

Re: importing and exporting config files

Sun Dec 06, 2015 2:45 pm

Hello!
Thank's, just try your advise.
Not yet clear:

system reset-configuration no-defaults=yes

[admin@MikroTik] >
[admin@MikroTik] > import verbose cfg_delay.rsc
expected end of command (line 1 column 16)
[admin@MikroTik] >


/delay 15
# nov/23/2015 05:11:50 by RouterOS 6.33.1
# software id = A0FI-Q0K1
#
/interface bridge
add admin-mac=4C:5E:0C:CC:CC:CC auto-mac=no name=bridge-local
/interface ethernet
set [ find default-name=ether1 ] mac-address=00:0E:08:EE:EE:EE name=\
ether1-gateway
............

or, without verbose:

[admin@MikroTik] > import cfg.rsc
nosuch item (4)


what's wrong again?
file opened by editor who can convert win CR+LF to LF, both the same result.
where is #16 in 9 sybols line? what else?
/delay 15 is #0 line?
/interface bridge is#1 line?
 
Milan
just joined
Posts: 16
Joined: Tue Mar 05, 2013 3:34 am

Re: importing and exporting config files

Tue Mar 06, 2018 7:33 pm

You have to export compact configuration (only changed values) by:
/export compact
Then reset configuration by:
/system reset-configuration no-defaults=yes skip-backup=yes
And then import with verbose=yes and watch what is wrong and possibly edit .rsc file to find where the problem is (try to delete half of the file):
 /import file-name="config.rsc" verbose=yes


For example now, on version 6.41.2, the export write out:
...
add interface=eth2-LAN loop-protect-disable-time=0s loop-protect-send-interval=0s name=vlan1 vlan-id=1
...
But when trying to import, there is an error message that the time should be at least 1s, so I manually edited .rsc and reduced the command to make it work:
add interface=eth2-LAN name=vlan1 vlan-id=1
When all seems to be ok, reset configuration and import again without
verbose=yes
. There should be no error message. Wait one or two minutes and manually check if everything is ok (configuration).

Do not forget to set admin password (and create users) after configuration will be imported.
Use same version on both systems if you are trying to move config to the backup device.
 
cerrito67
just joined
Posts: 2
Joined: Sat May 12, 2018 2:06 pm

Re: importing and exporting config files

Sat May 12, 2018 2:12 pm

Good morning, this is my first post.....
i have one routerboard and i want to import the configuration to routerboard 260gs, but have diferent OS....
Could anybody helpme....
I need to import this rsc.....but when i restore backup, no showme nothing....
Thx people..

/interface bridge
add name=bridge_lan

/interface vlan
add interface=bridge_lan name=vlan101-Hospedes vlan-id=101
add interface=bridge_lan name=vlan102-Funcionarios vlan-id=102

/ip pool
add name=dhcp_pool0 ranges=192.168.1.10-192.168.1.20
add name=dhcp_pool1 ranges=192.168.101.1-192.168.101.253
add name=dhcp_pool2 ranges=192.168.102.1-192.168.102.253

/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=bridge_lan lease-time=2h name=dhcp1
add address-pool=dhcp_pool1 disabled=no interface=vlan101-Hospedes name=dhcp2
add address-pool=dhcp_pool2 disabled=no interface=vlan102-Funcionarios name=dhcp3

/ip address
add address=192.168.1.254/24 interface=bridge_lan network=192.168.1.0
add address=192.168.101.254/24 interface=vlan101-Hospedes network=192.168.101.0
add address=192.168.102.254/24 interface=vlan102-Funcionarios network=192.168.102.0

/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1

/ip dhcp-server network
add address=192.168.1.0/24 dns-server=8.8.8.8 gateway=192.168.1.254
add address=192.168.101.0/24 dns-server=8.8.8.8 gateway=192.168.101.254
add address=192.168.102.0/24 dns-server=8.8.8.8 gateway=192.168.102.254

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1

/interface bridge port
add bridge=bridge_lan interface=ether2
add bridge=bridge_lan interface=ether3
add bridge=bridge_lan interface=ether4
 
NetWorker
Frequent Visitor
Frequent Visitor
Posts: 61
Joined: Sun Jan 31, 2010 6:55 pm

Re: importing and exporting config files

Thu Apr 25, 2019 7:48 pm

Backups are only valid for a given device with a given RouterOS and firmware versions. Backups are not intended for setup replication.
I apologize for reviving an old thread and quoting a 4 year old post but like gator, I was just *shocked* by this statement.

WHAT??? We have a few routers running in different networks, we didn't buy them in bulk and are all different. In fact we still have a RB450 running somewhere. Are you telling me that if/when they fail I won't be able to apply that file to a... RB750 for example? Good luck finding a new 450 in this part of the world!

Ok, so I just checked the wiki and it states
RouterOS backup feature allows you to save your current device's configuration, which then can be re-applied on the same or a different device (with the same model name/number).
This leads me to ask two things. First, that you guys put a warning in RouterOS. The backup function "seems" self explanatory and it never occured to me to read the wiki on it. Seriously, there should be warning about this. At the very least bold out and underline with the same model name/number. This needs to be emphasized. Also, it'd be awesome if you guys could rework the backup function so that it isn't make and model limited.

Now, I understand that this isn't so simple so for the time being I'll settle for a reply to the following. Is it possible to extract the compact export out of a backup file or do I have to write scripts in all my routers to export compact in addition to my usual backup, just in case I can't get my hands on an exact same replacement?
 
Sob
Forum Guru
Forum Guru
Posts: 4208
Joined: Mon Apr 20, 2009 9:11 pm

Re: importing and exporting config files

Thu Apr 25, 2019 10:00 pm

Do you want to be shocked even more? Do export, then for a while enjoy how it's nicely readable ... and then realize that it doesn't contain things like users or certificates. So in other words, you can have unreadable binary backup, which is not meant for transfering config elsewhere, but it will probably work, even though it can mess up some things. Or you can have nice readable export which you can inspect before you apply config to new router, but it's missing important things. Great, isn't it?
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply.
 
NetWorker
Frequent Visitor
Frequent Visitor
Posts: 61
Joined: Sun Jan 31, 2010 6:55 pm

Re: importing and exporting config files

Fri Apr 26, 2019 12:24 am

Yeah, I realized that from the above. I mean I was a happy camper with my regular backups, all nice and tidy, indexed by date and name, safely stored on the server. So if a router goes up in flames I got exactly squat. Nice.......

Who is online

Users browsing this forum: No registered users and 2 guests