With any re-flash / upgrade, you want to make sure that the sysupgrade process retains the proper files.
sysupgrade -l
will list the files that it will back up. The list can be modified with entries in /etc/sysupgrade.conf
Adding new packages usually adds their config, but you should confirm.
The list of packages can be obtained with opkg list-installed
and there are some scripts floating here to try to narrow that down to "user-installed" packages (those not in the ROM). The version of sysupgrade
on master
looks to have a new feature to capture a list
# Format: pkg-name<TAB>{rom,overlay,unkown}
# rom is used for pkgs in /rom, even if updated later
find /usr/lib/opkg/info -name "*.control" \( \
\( -exec test -f /rom/{} \; -exec echo {} rom \; \) -o \
\( -exec test -f /overlay/upper/{} \; -exec echo {} overlay \; \) -o \
\( -exec echo {} unknown \; \) \
\) | sed -e 's,.*/,,;s/\.control /\t/' > ${INSTALLED_PACKAGES}
(I haven't kept track of this as I almost always just build what I need into a ROM)
Creating your own backup of /etc/
can be valuable for comparison, or pulling a single file. Something along the lines of the following, then copy with scp to a safe place
tar cvf /tmp/office.etc.2019-02-01_0650.tar /etc
The truly paranoid might want to backup for offline, reference purposes all of /overlay/
(all files changed relative to the ROM). (Yes, I've done that myself, especially when changing hardware.)
With that in hand, sysupgrade should be smooth, your config preserved, and only a handful of packages to install from that list, if any.