I have had good service with OpenWRT and Mullvad Wireguard VPN. I updated my firmware with "openwrt-22.03.1-ipq806x-generic-netgear_r7800-squashfs-sysupgrade.bin". Afterwards, my Mullvad Wireguard VPN setup was broken and not recognized. I tried to "Restore" from backup and that did not work. I setup the VPN again manually and it is all working properly.
Is there a way to update my software and keep all settings intact?
It was explained to me by someone that routers are a little different and the safest way to upgrade is to use the prepared sysupgrade.bin file. Maybe one day it will be possible to upgrade my router like my Ubuntu PC through a command line in the terminal window. I use my R7800 as a client and it is fast with no problems otherwise.
If it is safe to upgrade through a terminal window with ssh, what is the proper terminal command to upgrade? If it preserves my settings and existing apps, then that would be nice.
To upgrade an image, you use the command sysupgrade
To install packages, you use opkg install
From your description, it seems like you just sysupgraded and never ensured you re-installed the needed packages afterwards. So just FYI - there's no need to use opkg update to upgrade your firmware to the next version, nor to install the needed packages. For more on the okpg warning, see: https://openwrt.org/docs/guide-user/installation/generic.sysupgrade#package_upgrade_warning
If you have a recent version 21 or 22, the attendedsysupgrade system may work for you. This uses a small client (auc, install with opkg install auc, then run with auc while router is connected to the Internet) to request and install a custom ROM from the upgrade server. This ROM will contain the packages you had installed on the old version.
Major changes like fw3 being replaced with firewall4 and swconfig being replaced with DSA will still need some manual working around.
I installed "attendedsysupgrade" with Luci and I also run "auc" with ssh on the router while connected to the internet. This is exactly what I always wanted. My system updates just like my regular Linux computer. I do not lose any settings or configurations and it is so easy. Thanks for the reply.