I was wondering if I set up OpenWrt on a router and then want to do the same setup on another router that has different hardware i.e. different brand entirely, can I use the backup and restore file I created, like when I do an upgrade? Or will that have things specific to that particular router/setup. I am wanting to do this with 24.10.2. The router that is set up is an ASUS RT-AC56U and the one I want to set up now the same way is a Cudy WR3000S. I can duplicate this setup from scratch, but if I don't have to I'd prefer to save a little time. Any advice here would be appreciated.
No, you cannot restore the config from one router onto another. In fact, there can be some device specific stuff that is stored in the configs (namely MAC addresses) that makes it so that it's not a good idea to restore the backup from one unit to another one of the same exact model.
That said, the differences are going to be in the /etc/config/network and /etc/config/wireless files. You can manually copy over /etc/config/dhcp and /etc/config/firewall without issue, and for the first two files I mentioned, you can recreate those fairly easily by using the backup as a human readable reference (if you're clever, you can carefully copy/paste sections of the config files without problems, but don't wholesale replace the file).
…and /etc/config/system (GPIO/ LED definitions), and…, and…, and…
Good point... yes, there are other config files that have critical differences from one model to another.
That said, @jrjohnson27 - the four files that are most common/critical for your configs are:
/etc/config/network
/etc/config/wireless
/etc/config/firewall
/etc/config/dhcp
As noted earlier, the first two files are not portable, although you can cut/paste some bits (depending on the details of the configs)... for example, it's okay to migrate Wireguard configs by copy/paste, and some other bits might be fine to move over this way. The second two files are safe to copy in-full (as long as you're migrating between the same versions of OpenWrt).
Of course, some users will have other config files for things like OpenVPN, PBR, ddns, and all sorts of other packages... those can usually be moved safely, but it does depend on the details.
Thanks for the replies. This clears it up for me so I now know what I can and can't do going forward. I am quite familiar with those files from using WinSCP and making some modifications that way. In this case I will likely just build it from scratch since it's a fairly simple setup. If I have a more complex setup and need to do this I may then pull some things from the files as outlined above. I appreciate the help.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.