Snapshot - attended-sysupgrade works, but /root files gone

I noticed after 25.12 is released, upgrading to snapshot will clear files in /root

and from one snapshot to newer with attended-sysugrade will also clear files in /root

Is this the expected behavior from now on? (happened from both OpenWrt routers I tested.)

My current build is:
OpenWrt SNAPSHOT r33473-7ba45de827 / LuCI Master 26.077.44598~1c34772

Thank you in advance!

If you don't have any /root files specified in the backup config, then yes it is expected that /root will be wiped. What's do you have in /etc/sysupgrade.conf? Do you see any /root files when you do sysupgrade -l?

Here's one of my devices for example:

$ cat /etc/sysupgrade.conf
## This file contains files and directories that should
## be preserved during an upgrade.
/root/.config/
/root/bin/
/root/.vim*

$ sysupgrade -l | grep /root
/root/.config/htop/htoprc
/root/.vim/.netrwhist
/root/.viminfo
/root/.vimrc
/root/bin/apk-deps.uc
/root/bin/append.sh
/root/bin/argparse.uc
...
2 Likes

I can confirm a similar (the same?) issue on master/main.

I definitely DO include /root in my sysupgrade.conf file. For some time now, though, doing an upgrade flash definitely does not include anything in /root.

The funny thing is, if I restore a manual backup after flash, all my files in /root are restored. So the backup/restore process definitely honors my /root entry while the upgrade process itself does not, for whatever reason.

1 Like