A few topics touched on this a little but not exactly what I was looking for. Basically, I want to perform a sysupgrade remotely. I am deployed and cannot do it locally. I have OpenVPN configured and can upgrade via ssh but my question is:
Do the OpenVPN configs get preserved and are they automatically reinstalled once the update is complete? I can reconfigure the rest of my settings and stuff as long as I can reconnect after the upgrade.
Configs, yes (unless you explicitly reject it, sysupgrade -n) - additionally installed packages, no (so if you need those to get online, you'll have a problem; e.g. openvpn).
Very personally I'd be wary to try an upgrade remotely via luci - and I'd be more confident in the current sysupgrade code (which was changed to be more self-contained/ atomic) than before (I think that's a post-17.01.x improvement) than the old for such a use case.
In your current running router you should put something like this, also put the same in /files on your build image box to build newer images with this file embedded :
Neither of those are necessary (all of those files are retained by default anyways!), nor will it help in the absence of the openvpn daemon (the binaries) - which you can't keep over an upgrade (without risking 'explosions' due to incompatible library ABIs).