How to avoid loss of configuration any time I upgrade?

Hi,
about an hour ago I updated to 23.05 from 22.03.5. The device was a dumb AP placed in a quite unreachable place that is used only to connect 2 devices in a storage room (a nas via cable and a wallbox via wifi).
The fact is that very often, when I upgrade, i lose all or some kind of config. This time, but i think because it's a new version, dumb ap config (fixed ip, DHCP disabled, network name and encription) is gone, wifi disabled by default and, in general, router unaccessible from my main network.

How can i get rid of those problems any time i update?

At least i need to reach the router from my main netowrk to upload the config through ssh. But i can't figure why luci is always gone (I never installed snapshots). The device is a Tp link archer C2 V1.

It's really frustrating. Any advice?
Thanks

I built myself a set of scripts for every device that are doing the OpenWrt configuration via uci. By comparing the output of uci show that's quite easy to do but it's still not a perfect solution.

1 Like

If you're upgrading through LuCi have you inadvertently unticked the keep settings tick box? You shouldn't often be losing basic settings during upgrades.

2 Likes

I run a device with snapshot and I update it about once a week. I don't lose its config, whatever I use SSH or Luci. I just take care that options are set before upgrading. The image is self-build and contains any package needed. So how do you manage to lost the config anytime? How do you perform upgrade?
In some case, with a major release (hence 22.03 -> 23.05), you may need to reconfigure the device. But this happens once. Any next minor update update should keep the config.

The problem is that if the config is gone, I can't reach the router to modify anything.
Reasoning on that, the only option i need to change from the default is the protocol of the lan interface from "static adress" to "DHCP client". This way the device will be reachable even with a total loss of config.
I don't know how to do that on the upgrade file or via a script that should be in the router even after the upgrade.

Yes, I'm sure about that. The persistence of configs was ticked.

What is the device you're upgrading?

I can see that the device has very little flash memory. Do you use a lot of packages? It could run out of memory and so the device erases settings. This is a known bug.

Tp link Archer C2 V1

I made upgrades through the upgrade file downloaded here on Openwrt. No self built images.
Maybe can you send me some links on how to do that? The only option thet i need to change by default is the protocol of lan interface. Qith that at least the decide will be rachable. For others option i can learn on the way.

No, only the default ones plus luci-ssl when the install gone wrong but in the last two upgrades (included 22 => 23 version) Luci was still there.

So I may understand that you install luci-ssl as a standalone package after the basic install. There may be the problem : it requires a lot of libs that are not packaged in the image. You may run out of memory.
Try.

  1. to install a default build, set some settings. reflash the same build. settings should be here.
  2. install a custom build that already includes luci-ssl. set some setting, reflash. Check for settings.

To create a custom build, you can easily use the image selector
https://firmware-selector.openwrt.org/?version=23.05.0&target=ramips%2Fmt7620&id=tplink_archer-c2-v1

click on customize and add luci-ssl. If you run out of memory, you can try to remove some unnecessary part suchs as PPP, firewall, DHCP. The device runs as an AP and don't need this.

EDIT:
I built the image, you can download it quickly.
https://sysupgrade.openwrt.org/store/1d88bf5cebf6361f0586eafd22e2f4dc/openwrt-23.05.0-f0c2ba71a04f-ramips-mt7620-tplink_archer-c2-v1-squashfs-sysupgrade.bin

Thanks for the info, image builder seems very useful.

Antually, exploring the list of packages installed by default, i don't see luci. Strange because this is a stable build, maybe a bug on this particular version?

A question: if i build a custom package with added luci-ssl and Uci script

config interface 'lan'
        option proto 'dhcp'

the other options will stay there?
This for me can be a solution because it means that the router will be reachable even with a config reset.

It is !!

No this is normal. One may want a stable release without Luci, so it is not included by default. Just manually add luci.

When you upgrade/update, the default behavior is to keep settings, whatever you have set up.