Community discussions

MikroTik App
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 2:42 pm

Hello!
I want to ask if someone of you ever restored a Mikrotik Router successfully in the first run without problems?
The last time I had to restore one was a few years ago when I started my Mikrotik journey. Exemplary I did Backups with the - so called - Backup button in the File menu and thought, well yeah, I though I just did a backup lol
Everyone that already tried to restore a backup that has been done with the Backup tool (lol) will know that it will fail. I don't even ask questions anymore about this process..

However, today I got me a new hap ac 2 and did a very basic configuration, just to make a backup with - the not so called - "real" backup function: export verbose show-sensitive
And then I tried to restore it because I was curious. The first hour I had to find out how to move a file to the flash folder - yes, for real, there is no move function lol So I had to use the fetch tool with a completely insane command only autists would come up with but ok it worked. The reason why i had to move the file to the flash folder was because otherwise it's not persisted after boot just for info.
Ok, so i restored it using the *official* method: system reset-configuration run-after-reset=path/to/the.exported.file.rsc no-defaults=yes
and guess what? It failed. After some trail and error I came up with the solution to just run the commands from thr rsc file in the terminal, just copy & paste. Most of them failed but at least it ran the whole stuff. So in the end I had like 95% of the config restored and had to do the rest manually.

I really wonder if this is it? I mean.. could it be? Is this really how this is supposed to work because the named backup tool isn't a backup and the official solution isn't a solution?
How do you guys do it? Also I would really like to know how Mikrotik staff is doing this on a day to day basis.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12554
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 3:35 pm

a completely insane command only autists would come up with
How dare you be so offensive?
It's a serious problem.
 
holvoetn
Forum Guru
Forum Guru
Posts: 6753
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 3:43 pm

Being quite a bit autistic myself ... (I learned to deal with it :lol: )

Backup / restore does work perfectly if done on the same device.
Did it again this morning when toying with AX3. I can not remember a single type of Tik-device where I have not at least done it once.
(just counted, I already had 15 different types in my hands)

Export config and restore, that's something else.
Done that quite a bit of times as well and yes, it's not a simple set-and-forget process (most of the time something is wrong in the sequence of things) but to be honest, with a text editor and keeping winbox/terminal in a window next to it, it usually doesn't take more then 15 minutes.

Moving file from ram to flash is actually easy.
You just need to select and drop it on the right place in Files.
PS I always move such files out of the device. I trust my own computer storage (and Onedrive) just a bit more then Mikrotik storage.
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 3:55 pm

a completely insane command only autists would come up with
How dare you be so offensive?
It's a serious problem.
lol I include myself here
 
txfz
Frequent Visitor
Frequent Visitor
Posts: 66
Joined: Tue Mar 10, 2020 9:02 am

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 3:56 pm

Did you have an actual question or was it all rhetorical?
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:01 pm

Being quite a bit autistic myself ... (I learned to deal with it :lol: )

Backup / restore does work perfectly if done on the same device.
Did it again this morning when toying with AX3. I can not remember a single type of Tik-device where I have not at least done it once.
(just counted, I already had 15 different types in my hands)

Export config and restore, that's something else.
Done that quite a bit of times as well and yes, it's not a simple set-and-forget process (most of the time something is wrong in the sequence of things) but to be honest, with a text editor and keeping winbox/terminal in a window next to it, it usually doesn't take more then 15 minutes.

Moving file from ram to flash is actually easy.
You just need to select and drop it on the right place in Files.
PS I always move such files out of the device. I trust my own computer storage (and Onedrive) just a bit more then Mikrotik storage.
As far as I know the moving of files using drag and drop is only working in Winbox and that's kind of an issue in Linux. Although I have a couple of devices in my house none of it is running Windows so that is a bit annoying.

Ok, so since I did it on the same device and it wasn't working, please tell me your secret?

But in general, this process shouldn't be like this. There should be an easy way of doing this in 2023. And if that's not possible, at least the docs should be correct.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 21895
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:02 pm

Having a Mikrotik Router like being married, yeah its a pain in de ass but cheaper than the alternatives. I just wish there was a safe mode........ ;-)

You have had all the choices in the world to understand and learn how to do backups properly. Its not clear you do yet, nor is it clear you have really tried.
"Insanity is doing the same thing over and over again and expecting different results." quote from not AE.
Last edited by anav on Thu Apr 06, 2023 4:02 pm, edited 1 time in total.
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:02 pm

Did you have an actual question or was it all rhetorical?
Well, I know it's kinda long but the actual question is actually in the last line.
 
holvoetn
Forum Guru
Forum Guru
Posts: 6753
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:08 pm

Ok, so since I did it on the same device and it wasn't working, please tell me your secret?
Don't know. Hit Backup
Come back later after goofing up config and hit Restore. Done.

Fingerspitzengefühl, I guess ? There is no secret.
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:09 pm

Having a Mikrotik Router like being married, yeah its a pain in de ass but cheaper than the alternatives. I just wish there was a safe mode........ ;-)

You have had all the choices in the world to understand and learn how to do backups properly. Its not clear you do yet, nor is it clear you have really tried.
"Insanity is doing the same thing over and over again and expecting different results." quote from not AE.
Yeah I know this and I love my Mikrotik devices haha

And yes, I was that naive to believe a Backup button would actually do a backup. But since the lazy implementation of OpenVPN I should have known better lol
But today I really tried it in many ways, I just wanted to keep my post short (which I failed anyway).
However, me as a nerd would have give the same answers like yall one year ago but then I found something called UX - and in fact it's a thing. I know many nerds really don't care about it but it's ignorant and wrong and won't help to improve Mikrotik neither. This backup function is something very crucial and should work as intended, I will definitely not step down from that point even when I love Mikrotik devices.
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:16 pm

Ok, so since I did it on the same device and it wasn't working, please tell me your secret?
Don't know. Hit Backup
Come back later after goofing up config and hit Restore. Done.

Fingerspitzengefühl, I guess ? There is no secret.
Will try that again now. Maybe there was an issue with different Firmware version, package versions or whatever. Will take care now that it's exactly the same.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12554
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:23 pm

Here you need to specify what is meant by backup (.backup) and export (.rsc).
(ignoring if it is an export with hide-sensitive in v6 NOT specified or in v7 with show-sensitive set)

If backup means to save the current complete configuration of the device (except the files in... /files...),
to then restore it after you bungled and/or reinstalled the software THE SAME OS VERSION AS BEFORE,
here is what is meant by backup.

If by backup instead you intend to save the configuration and then import it on a DIFFERENT device, or ANOTHER OS version, well, that is NOT a backup...

Export for working as expected must not be verbose (is another question) and have not hide-sensitive or have show-sensitive as previously wroted.
Export do not export all.
Just visualize the changes from the default configuration and NO certificates / ssh keys / users certs / the dude / (full) user-manager / etc.

If by export you mean a system for exporting the configuration (except for the aforementioned other components)
in order to modify it BY HAND(***) to import it on a DIFFERENT machine (or also the same with same or another OS version)
without ANY CONFIGURATION (reset with no-default), it is exactly what is intended.

If by export you mean a method to have a configuration file to MODIFY BY HAND to create a template for mass configuration, that's correct.

(***) not /import on terminal

Any other expectation from backup or export is inaccurate.
(and I may still have forgotten something)
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:31 pm

Here you need to specify what is meant by backup (.backup) and export (.rsc).
(ignoring if it is an export with hide-sensitive in v6 NOT specified or in v7 with show-sensitive set)

If backup means to save the current complete configuration of the device (except the files in... /files...),
to then restore it after you bungled and/or reinstalled the software THE SAME OS VERSION AS BEFORE,
here is what is meant by backup.

If by backup instead you intend to save the configuration and then import it on a DIFFERENT device, or ANOTHER OS version, well, that is NOT a backup...

Export for working as expected must not be verbose (is another question) and have not hide-sensitive or have show-sensitive as previously wroted.
Export do not export all.
Just visualize the changes from the default configuration and NO certificates / ssh keys / users certs / the dude / (full) user-manager / etc.

If by export you mean a system for exporting the configuration (except for the aforementioned other components)
in order to modify it BY HAND to import it on a DIFFERENT machine (or also the same) without ANY CONFIGURATION (reset with no-default), it is exactly what you need.

If by export you mean a method to have a configuration file to MODIFY BY HAND to create a template for mass configuration, that's correct.


Any other expectation from backup or export is inaccurate.
(and I may still have forgotten something)
Thanks, I really appreciate your time to write this explanation, will bookmark it. But in the same answer you've proved my point that it's a pain in the ass and need a lot improvement at least in the docs. I mean this isn't some open source product (nothing against open source, I love open source), this is a billion dollar company. Despite all the other stuff that I really think is absolutely great about Mikrotik, this for sure is not.
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:37 pm

Ok, so since I did it on the same device and it wasn't working, please tell me your secret?
Don't know. Hit Backup
Come back later after goofing up config and hit Restore. Done.

Fingerspitzengefühl, I guess ? There is no secret.
Well, that works and I'm really glad about it (Y)
So I just need to remember to always make a backup before and after FW/package upgrades.
Now if only Mikrotik finds a way to get this done from a device to another device that easy.. :D
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7186
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:40 pm

 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:43 pm

All of this is already documented:
https://help.mikrotik.com/docs/display/ ... Management
THANKS! I searched for so long on Google to find exactly this! I even used search words like "mikrotik export terse" to find this page but no luck. Will bookmark this forever!
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12554
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 4:46 pm

Also read this, the RouterOS documentation is incomplete on what to save from the RouterBOARD...

viewtopic.php?f=1&t=175360&p=858564#p858564
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4324
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 5:25 pm

the not so called - "real" backup function: export verbose show-sensitive
I wouldn't call it a "real backup". At the end of the day, export and import are just tools for managing config, not a backup/restore method alone. (See post directly above for a "complete" backup using export and more...)

On same device, as noted, .backup file/"Button" maybe best approach. And restore, to same device, should just work.

Where there is room for criticism is an "upgrade" in a typical home user case: e.g. "I have an hAPac2 and got a hAPax2 to replace it". A .backup file will likely break when used on different device/verison, so not really usable. And an "export" file almost certainly requires "tweaks" to work on a new device before import. The latter involves a fair bit about how RouterOS manages config to perform – obviously possible but not "user friendly". So "pain-in-the-ass" seems fair if editing config files is required to just moving from "ac" to "ax" hardware and just wanted keep everything else the same...

When you start managing multiple Mikrotik, the config system make a lot more sense since it's very flexible. But flexibility makes it complex...
Last edited by Amm0 on Thu Apr 06, 2023 5:31 pm, edited 1 time in total.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12554
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 5:30 pm

When is all blank with wifiwave2 installed (with reset no-defaults)
rename the wlan1 with the same previous name (is readable on .rsc)
open with "notepad" the .rsc, import section by section except the /interface wireless items,
and you can use the "wireless" section for see previous config and do the same things on winbox or webfig on wifiwave2 section.

Try to do the same with the other productors...
 
optio
Forum Veteran
Forum Veteran
Posts: 945
Joined: Mon Dec 26, 2022 2:57 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 5:35 pm

@badroute432
If you are creating backups often / scheduled, maybe consider mounting external drive (usb flash drive, network drive...) and put backups there instead on flash to avoid flash wear out, also copy that backup on local computer or some other backup drive to always have backup copy if that mounted external drive fails.
 
holvoetn
Forum Guru
Forum Guru
Posts: 6753
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 5:36 pm

I wouldn't do that (renaming of the interfaces).
You might get into other problems later on when you forget you changed it.

Just get used to the fact they have been renamed.
Rename the config before import. Not on the device.

My view.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 5:37 pm

Yes, it is the usual problem that MikroTik really should do something about...
Like:
- fix that problem that a run-after-reset script fails because the interfaces are not up. delay the run of a run-after-reset script until the router is ready for it. that should be much easier to do internal to RouterOS than using the kludges in the script itself
- add a parameter to import (maybe even make it default) so that it continues after errors. all too often there will be minor errors during the import that can just be ignored. print the errors (including the line number + line that caused them) and continue.
- allow ALL config data to be /export'ed and /import'ed even user info, certificates etc.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12554
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 5:41 pm

On the previous link I post is present all to backup all, and restore later...

But if is diretly supported from RouterOS is better....
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 5:47 pm

the not so called - "real" backup function: export verbose show-sensitive
I wouldn't call it a "real backup". At the end of the day, export and import are just tools for managing config, not a backup/restore method alone. (See post directly above for a "complete" backup using export and more...)

On same device, as noted, .backup file/"Button" maybe best approach. And restore, to same device, should just work.

Where there is room for criticism is an "upgrade" in a typical home user case: e.g. "I have an hAPac2 and got a hAPax2 to replace it". A .backup file will likely break when used on different device/verison, so not really usable. And an "export" file almost certainly requires "tweaks" to work on a new device before import. The latter involves a fair bit about how RouterOS manages config to perform – obviously possible but not "user friendly". So "pain-in-the-ass" seems fair if editing config files is required to just moving from "ac" to "ax" hardware and just wanted keep everything else the same...

When you start managing multiple Mikrotik, the config system make a lot more sense since it's very flexible. But flexibility makes it complex...
Ok, let's call it "upgrade". The thing is that I'm not a typical home user and still got my problems doing it. I'm a full stack dev, also pretty deep in devsecops, so obviously not that deep in networks but I for sure do more complex things with my Mikrotiks than a home user. What I mean is that the need to move from one devices to another is there and the solution is currently not satisfying, even for people in tech. Maybe not for network gurus which are the majority in this forum but a minority compared to users of Mikrotik devices.
So yeah as you said, there is room for criticism on this topic.

Edit:
Well, when I really think about it, it's just a migration to another device. So the pain in the ass is in fact the migration of a Mikrotik device.
 
optio
Forum Veteran
Forum Veteran
Posts: 945
Joined: Mon Dec 26, 2022 2:57 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 7:51 pm

Well, when I really think about it, it's just a migration to another device. So the pain in the ass is in fact the migration of a Mikrotik device.
Each device if different can have different network interfaces so this is not achievable by just simple export/import, even if you do exports by sections still some configurations (firewall rules, etc...) can depend on device interfaces and needs to be adjusted manually in text editor before import.
Personally never had a problem when restoring .backup file on same device with same ROS version (on each ROS upgrade I'm creating new backup for that version just in case...), but when importing export .rsc file I had problem with interfaces which have delayed UP as pe1chl mentioned in viewtopic.php?t=195171#p994740, then I also needed to modify export (and I'm not network guru or professional).
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4324
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 8:20 pm

Ok, let's call it "upgrade". The thing is that I'm not a typical home user and still got my problems doing it. I'm a full stack dev, also pretty deep in devsecops, so obviously not that deep in networks but I for sure do more complex things with my Mikrotiks than a home user.
It's actually here where if view the config file as a script with a TCL+LISP language might be helpful. You can take a config and essentially add a bunch of conditionals around the "add" so they check if something was "set". In this approach, you can just add more conditionals based on variables to control anything specific. And with more conditionals you can deal with at let some set of devices.

More simply, you can start with the /system/default-configuration/script/print which gives a pretty good example of a "importable" script. So if you plug-in the config section from an export that you need into that, it will work with a "/system/reset-configurration run-after-reset=file.rsc keep-users=yes no-default=yes"

But to the point, there is not a some super-simple middle ground or tooling for "migrating" a config from one device to another. But lot of options to script this for a variety of purposes & replacing the entire config however.
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Thu Apr 06, 2023 8:34 pm

Ok, let's call it "upgrade". The thing is that I'm not a typical home user and still got my problems doing it. I'm a full stack dev, also pretty deep in devsecops, so obviously not that deep in networks but I for sure do more complex things with my Mikrotiks than a home user.
It's actually here where if view the config file as a script with a TCL+LISP language might be helpful. You can take a config and essentially add a bunch of conditionals around the "add" so they check if something was "set". In this approach, you can just add more conditionals based on variables to control anything specific. And with more conditionals you can deal with at let some set of devices.

More simply, you can start with the /system/default-configuration/script/print which gives a pretty good example of a "importable" script. So if you plug-in the config section from an export that you need into that, it will work with a "/system/reset-configurration run-after-reset=file.rsc keep-users=yes no-default=yes"

But to the point, there is not a some super-simple middle ground or tooling for "migrating" a config from one device to another. But lot of options to script this for a variety of purposes & replacing the entire config however.
Yes, that's currently obviously the best way to do it but also super time intensive and since I need to do this every 8-10 years it's also super annoying lol
I run a SaaS company where I'm basically the only employee so I would prefer the super-simpe tool for migrating and hope Mikrotik will do this in the future to save time of the customers. My company is soooooo far away from being worth more than 1 billion like Mikrotik but you can bet on it that I implement all the stuff my customers wish for in feedback, especially if it's so crucial.

So I really thank yall for the responses, especially for the ones providing great hints how to do it properly, really appreciate it but still hope I won't need it that soon :D
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 21895
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: why is restoring a mikrotik router such a pain in the a?

Fri Apr 07, 2023 6:22 am

SaaS, is that analytics platform thingy?? If so I hear about that more and more every day. I would like to learn more about it.
 
badroute432
just joined
Topic Author
Posts: 16
Joined: Wed Apr 05, 2023 1:41 pm

Re: why is restoring a mikrotik router such a pain in the a?

Fri Apr 07, 2023 8:15 am

SaaS, is that analytics platform thingy?? If so I hear about that more and more every day. I would like to learn more about it.

SaaS itself is just the term for software as a service, so basically software that you don't have to download and install but instead you run it in your web browser and in most of the cases you pay a monthly subscription. And yes, I'm sure it's the future of software as long as nothing more innovative comes e.g web3 (if they come to an agreement about the definition of web3 lol)
So a SaaS doesn't need to be an analytics platform, just to give you a few examples: Microsoft 365, Zoom and Netflix

Who is online

Users browsing this forum: anav and 28 guests