I want to take the warning about upgrading packages seriously. I use the opkgscript to preserve the installed packages and generate a backup archive via Luci. My question is, if I have to reinstall OpenWRT and all the packages, isn't that exactly like the bulk upgrade that we are told not to do? If upgrading packages is so dangerous, how do I restore my system with the correct/safe versions?
Installing packages is distinctly different than upgrading packages. There should be no issue using the script to restore back to your previous running configuration.
The package upgrade (opkg upgrade
) does indeed need to be used only when necessary... it will specifically upgrade a package that is already installed. But installing packages (opkg install
) is totally different, as it simply installs a package that is not currently installed... if the package is already installed, it will do nothing.
I am missing the difference between opkg upgrade
on an old install and opkg install
on a new install.
If I have two identically configured routers with identical package versions and one of the routers crashes and I restore it, the package versions of the two routers will still match after I restore it? If I install the same version of OpenWRT that are on the two previous routers, but at a later date, and install the packages by hand, will the package versions match?
Honestly, I'm not 100% certain.
IIRC, opkg install
will install the latest available version -- but it will only do so if there isn't already a package with the same name already installed. It will not upgrade packages already installed.
On the other hand, opkg upgrade
will explicitly upgrade previously installed packages.
On a functional level, opkg install
should always be fine, even if there are version differences resulting if a device were to be setup at a later time. There should never be any major changes that would affect core functionality or configuration syntax within any major version and its subsequent service releases. Such changes would only occur across different major versions (and only if necessary).