What is saved when you make a backup copy using luci?

I use the option to backup the router config just in case a break something.

I was using an old router and configured it a I liked (spanish interface, dns and dhcp settings, etc), as I had bricked my main one.
Once I was able to debrick my main router, I tried to use the saved config to restore the config in the new router (using luci interface) thinking it would just restore not warmfull options (dns settings etc).

But the router did not even boot. It complained about not finding network interfaces, and things like that.

The name of net interfaces was different in the new router as it has a completly different hardware.

So it seems that all configs are saved, even config for low level things.

It would be great to be able to select what do you one to restore and not restoring all things.
I had no option.
Is there a way to do that?

The stored settings are not compatible between different devices (models), at least the switch configuration and wireless device paths differ vastly among different devices (but there are no guarantees for the other settings either). You can only restore the backup on the device used to create it (at least the same model, but strictly speaking only the same device, as the backup may also contain MAC addresses).


Yes that seems to be the case.

But it would be usefull to be able to select what part of the config should be restored.

Imagine you have configured DNS, DHCP, many leases, etc.

And you make a change in router hardware or change the router model.

As you say you cannot restore the complete config as it would not work in your router.

But it would be great to restore at just dns and dhcp config (not the switch or ethernet config, for example) and not having to reconstruct everything from scratch.

It would be a good improvement for future releases to have that in luci interface.

It's a good idea. But with OpenWrt allowing a big deal of customization, and things are interconnected, separating things isn't probably going to work like a charm. (I would wish to see such option though)

About your case, when you make a backup of your configuration, it does craft a copy of all configuration files, and then you can restore or copy what you need to the me router.

1 Like

No, you are right, if you do not select appropiate restore config blocks.

But would be much better than how it is now, where you only have the option to restore everything.

If you change the hardware, you probably should not select ethernet and wifi config, and switch, the most basic layers to restore.

But once you have configured that basic layers if you restore top level ones config like dhcp and dns it at least should not break access to the router via web and you can change later what may not work.

The backup file is a gziped tarball containing files. Use an archive manager and remove-modify things from inside it, then you can upload it to the new device.

1 Like

That is a good point.
If you know what you are doing you can decompress it and select which files to delete before recompresing.

But it would be a great additions for next releases that luci let you select which configs to restore before doing it.

You can always select which files will be backed up.
Check https://openwrt.org/docs/guide-user/troubleshooting/backup_restore
and files in /lib/upgrade/keep.d/


You can also delete the unwanted files from the config file - before restoring them.


Thank you all.

Yes it seems risky to restore some configs in another router.

And then possibility of modifiying the backup files is great.

But for a user with not too much knowing of openwrt insodes is not so easy.

That is why some help from the lucy interface would be greatly wellcome, for future releases.

It would be great to be able to select what to restore.

And would be even better if it lets you select to restore in a new hardware, and it only restores secure configs.

By secure I mean configs that won't break the possibility of accessing the router in the lan interface via web, at least using the default ip.

If you have made a backup and your hardware crashes, being able of doing that will let you not begin from scratch, and config the basic access to the new router, like interfaces and ips and then restore dns config, leases, tunnels, etc.

Even if you have to twake something later, would be less work than begining from scratch.

  • Can you describe what this means?
  • Have you seen the Wiki?

I've never heard of someone blindly restoring a config from another device. Unless they were the same make/model.

How do the developers pick what you wish to change and not change?

I've never had the issue you're describing. It's not hard to restore the file.
What do you mean by the phrase "begin from scratch"???


EDIT: and yes, it's extremely risky to to restore some configs in another router!

Sorry if my bad english don't let you understand me.

Begin from scrath means having to reconfigure all detaips and parameters again.

There are things that are quite secure to restore if you have reconfigured basic interface and vlan parameters, like leases, hostnames and port redirections.
It can take a while to introduce all that using the luci interface, if you remember how you configured it the last time.

I don't know exactly how the developers would know what params are dangerous or not, but i am sure that they know it better than me. I don't know how they do most of their magic, either.
Anyway just letting me select which config blocks to restore in the luci interface would be easier to use that having to dig in the backup myself.
Making things easiear to do for not too tech people is what a graphical interface is made for.

You are lucky if your hardware did not ever fail without previous notice.

Yes, I have seen the wiki, but probably not the page you have in mind. Letting others know what page it is, would help them understand what are you meaning.