By default on new factory-flash installs, Luci should have a default variable that prompts the user before flashing as part of the flash process flow, to ‘Make a backup before flashing’.
It’s simple to implement. That box that pops up that says “Keep settings and retain the current configuration” (which is redundant, isn’t it?), should have a checkbox just beneath it, that says “Make a backup before flashing”, so when a user clicks ‘continue’, instead of immediately flashing, they are given a prompt of where to save the download.
Hi! Just to clarify: does your request also apply to the very first installation of OpenWrt on a new device (factory-flash), or are you referring only to subsequent firmware upgrades?
Subsequent firmware updates, of course, because the device would already have to be running openwrt to provide the prompt.
The specific use case that prompted the thread: transitioning between v25 images that use ‘list ipaddr ‘192.168.1.1/24’’ for the bridge in place of the v24 ‘option ipaddr ‘192.168.1.1’’, in /etc/config/network, that’s causing the device to become inaccessible over the network after upgrading. Yes, ipv6 still works in many cases (if it was enabled), and they can do a reset, look at the current settings and figure out what’s incompatible in their backup (if they have one), which is what I did.
Optimally, an additional prompt that, only appears if it detects some sort of ‘update notes’, displays them in a modal box, such as “Openwrt changed how your bridge is addressed, therefore your device will become inaccessible after the flash due to (explanation, i.e. unless you add the ‘list ipaddr ‘192.168.1.1/24’’ to your network config.)” but I don’t know, beyond that, conceptually how that would be integrated into a prompt prior to flashing.
At least in the proposed way, of a simple default checkbox that triggers a backup download, implementation should be easy, and it assures that the user does at least have a working backup, should the upgrade send them into resetting their device to regain control of it.
and of course, ideally having logic in openwrt’s upgrade process to check the old config file and migrate the format, or, barring that, being able to look at the config file from only one version prior, and migrate the settings (assuming the user has a backup and has done a reset).
I understand and appreciate your request, and from my point of view it makes sense. I would like to point out, however, that many people are currently using OWUT, which already implements a similar pre-installation backup procedure using this script: https://raw.githubusercontent.com/efahl/owut/refs/heads/main/files/pre-install.sh.
A key point, though, is that this script runs automatically and does not provide an interactive prompt like the checkbox you proposed. It creates backups or archives firmware manifests without asking the user where to save them.
So while OWUT can ensure that users have a working backup before upgrading, it doesn’t fully replicate the pre-flash prompt workflow you suggested, where the user explicitly chooses to create and save a backup.
Regarding your point about migrating old configuration files during upgrades, I’d like to note that there are many scenarios where an automatic migration cannot be reliably performed. For example, major architectural changes like the transition from swconfig to DSA fundamentally alter how network interfaces and bridges are managed.
In such cases, even if a backup exists, the system cannot safely convert all settings automatically, and manual intervention is usually required to ensure the configuration works correctly after the upgrade. So while migration scripts can help in some cases, there will always be edge cases where human review is necessary.
That migration primarily happened in 2023, and some effort was made to advertise it (I believe). And so, if not, if someone just downloaded the image and had poor luck, that’s what that modal pop-up is for, with messages about “Hey you have this older version of openwrt and the newer version uses [insert update technology here, whether ‘DSA’ or ‘list ipaddr’], which will render your device inaccessible from the LAN after update”.
the system cannot safely convert all settings automatically
I’m not asking for a hail mary miracle but the minimal effort so the box does not become inaccessible completely, would be optional in this regard, as the main thrust is simply, to go back to the original reason I started this thread, to have a default checkbox for creating a backup prior to flash.
As for OWUT, that’s the first I’ve ever heard of it being called that. I build my own images and have seen the 'attended sysupgrade’ and the new prompt about checking for updates that comes up once with the new firmwares. I have other things to do rather than read the openwrt forums every day.
I want to emphasize that I’m fully in favor of adding a checkbox to create a backup before flashing.
My mention of OWUT was only for context—it automates backups but doesn’t offer the interactive prompt you suggested, so my support for your idea remains unchanged.
I hope this proposal will also be well received by the rest of the OpenWrt community.
A DSA migration is on the horizon for qualcommax (ipq53xx/ ipq60xx/ ipq807x) and qualcommbe (ipq967x), likewise ath79 is pending to go to DSA (technically everything is there, it did work in the past, it currently doesn't - but that's a fixable bug, it 'just' needs a lot of effort to get all the hundreds of devices changed for it). So no, major migrations like (and including exactly) DSA are not done and dusted.
I do understand your motivation, but I don't think 'insisting' ~= not upgrading without it would be a good idea, encouraging the user to do that however is another topic.