Upgrade from 18.06 to 19.07 preserving settings and packages

Dear guru,

I am using version 18.06.2 r7676-cddd7b4c77 / LuCI openwrt-18.06 branch (git-19.020.41695-6f6641d) on Netgear WNDR3700. With many custom packages and settings. Could you please advice the best way to upgrade my router to the latest available firmware preserving all that settings.

Thanks in advance,
Vadim

export your settings, run script pre and post upgrade, reload settings

@frollic thank you for the fast response. I am not very experienced in OpenWRT so I would appreciate if you provide more details concerning "run script pre and post upgrade". Also wouldn't it be possible to do upgrade automatically via LuCi?

You can preserve settings in a sysupgrade.

But sysupgrade does not preserve the installed add-on packages. So, you need to save the list of installed packages and then re-install them after the sysupgrade. frollic linked you to

The best way with resource-constrained devices (like WNDR3700 with only 8 MB flash) is to build your personal image with all needed package included in the firmware itself. Including packages in the image compresses the binaries of the packages and the image consumes less flash space than image + later installed packages.

Using imagebuilder (or even the full toolchain) is not that hard.

@hnyman, thanks for the advice. Will try imagebuilder. The only questions is: what kind of image image builder is supposed to create? I see two kind of pre-build images for my device: *factory and *sysupgrade. I definitely need *sysupgrade - will image builder prepare this one?

It will. Likely it procudes both by default.

(I use the full toolchain, so I have no sure knowledge of the current imagebuilder outputs)