Community discussions

MikroTik App
 
tlamik
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Fri Mar 21, 2014 11:54 am

Howto save and restore configuration ? Howto clone config ?

Wed May 07, 2014 1:37 pm

I have two production MT and one backup. Both of them are on v5.26. I want to cover these two situations: mismatch or lost configuration, total HW destruction. So there can be a two situations, I will need to restore configuration on the same device or I will need to restore configuration to another device. So my questions are how can I backup config for restoration on the same device and howto backup config to restore to another device ? I used to backup on the same device command "system backup save" until I get advice to use export command instead. But I have a very bad experiences with export command. I tried this procedure:
- /system backup save
- /export compact file=txt
- /system reset-configuration
- I connect using winbox
- import txt.rsc
- I get an error "failure: already have device with such name"
- OK, I remove line with interface bridge
- again import txt.rsc
- router has been disconnected and I am unable to connect (IP neither MAC)
- OK, I tried /system reset-configuration no-defaults=yes
- again import txt.rsc
- I get an error "input does not match any value of interface interrupted" and MT has been disconnected
- I am able to connect, BUT not all settings were restored, only a few of them :(

What I am doing wrong ? I know on v6.12 there is verbose param during import and I can see on what line is error, but how can I manage this in v5.26 ? rsc script has cca 50KB.
Is there a differce between restoring that script on the same device and on another device, because I don't see any MAC there, except admin-mac ?
 
plisken
Forum Guru
Forum Guru
Posts: 2511
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: Howto save and restore configuration ? Howto clone confi

Wed May 07, 2014 11:07 pm

If you want the backup file use on the same device can you use /system backup save.
If you want the same configuration on another routerboard must you use /system export file=yourfile don't use export compact

If you want insert an export file into another routerboard (the same model) /system import file=yourfile

See on my website http://www.wirelessinfo.be/index.php/mi ... es/exporte
 
tlamik
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Fri Mar 21, 2014 11:54 am

Re: Howto save and restore configuration ? Howto clone confi

Thu May 08, 2014 1:20 pm

Thanks,

I understand, on the same device I can use system backup.
I don't understand the second sentence. You wrote that I have to use /system export, but this command will save only settings from /system, which is not enough. I've made a good experience with compact option. I noticed that export with compact and without compact in v6.12 produced the exactly same rsc files. In v5.26 there are different.

Your website help with export and import looks good, but it's not that simply. I tried in v5.26, without any luck of import, in v6.12 is much better, cos there is verbose option. Maybe it works in both version if You have a very simple configuration. In my case it didn't work and I had to make some changes in rsc file.

Next issue I noticed is that export in v5.26 cannot be imported to v6.12, there are some changes in configuration options and there for my v5.26 rsc failed to load to v6.12.
 
plisken
Forum Guru
Forum Guru
Posts: 2511
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: Howto save and restore configuration ? Howto clone confi

Thu May 08, 2014 2:18 pm

Just export file=myfile

Done
 
Rudios
Forum Veteran
Forum Veteran
Posts: 977
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Howto save and restore configuration ? Howto clone confi

Thu May 08, 2014 2:20 pm

In basic the export compact should be enough.
Nevertheless there are situations where the config file created contains information that can not be handled during an import.
One of those cases is the default user available when the user-manager package is installed.
Another situation is when hotspot is installed which will also give some default values which will cause in import to fail.
If you have installed either one of them, review the created config file and remove any defaults of them.
Also be carefull about MAC addresses mentioned in the config file!
 
plisken
Forum Guru
Forum Guru
Posts: 2511
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: Howto save and restore configuration ? Howto clone confi

Thu May 08, 2014 2:23 pm

For a fully backup i never use export compact
 
Rudios
Forum Veteran
Forum Veteran
Posts: 977
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Howto save and restore configuration ? Howto clone confi

Thu May 08, 2014 2:37 pm

For a fully backup i never use export compact
I do since it does not contain anything that is already in default.
And like I said it may also contain MAC addresses which are not available on any other device
 
tlamik
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Fri Mar 21, 2014 11:54 am

Re: Howto save and restore configuration ? Howto clone confi

Thu May 08, 2014 2:52 pm

The best way to clone I've already have is :
- export compact on device1
- system reset-configuration no-defaults=yes on device2
- login using MAC with winbox
- import previous backup from device1

-problem no.1: I am unable to copy files while I am connected through MAC
-problem no.2: if during an import there are some kind of stuff like renaming interfaces etc etc, then mikrotik disconnect and I am not sure if it loads the whole file. I am using system reset-configuration no-defaults=no run-after-reset=device1.rsc and it almost works fine, but sometimes it didn't.

export without compact will save everything including the default config and MAC etc etc, with compact will save only differencies maded and without interfaces MACs, which is good for cloning to another device.
 
jerryroy3
just joined
Posts: 2
Joined: Wed Aug 31, 2016 5:15 am

Re: Howto save and restore configuration ? Howto clone config ?

Wed Aug 31, 2016 7:14 am

Anyone have a solution? This is not working as expected.
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2942
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: Howto save and restore configuration ? Howto clone config ?

Wed Aug 31, 2016 7:23 am

Try to rename your interfaces manually and remove these commands from exported configuration befor importing it.

Who is online

Users browsing this forum: No registered users and 13 guests