I know this info I'm about to link is for upgrading the Duo Authentication Proxy software itself, but it's still relevant for OS upgrade or migration.
https://duo.com/docs/authproxy-reference#upgrading-the-proxy
There it lists the locations of config and log directories which you would want to back up.
If you were to migrate to a new server, you could install the Duo Authentication Proxy software and plop in the contents of the conf and log directories from the existing Duo proxy server to duplicate the config.
If you are using your Authentication Proxy for Duo SSO AD Authentication then you will also need to rerun the command to connect the Authentication Proxy to Duo again (as described in step 8 here).
For an in-place server OS upgrade, you should make sure to backup the contents of those directories in case you need to restore them after the upgrade completes.
A caveat: we haven't tested an in-place upgrade from CentOS to Rocky ourselves. Generally we don't expect you to encounter problems, but we did see that customers who did an in-place upgrade to Ubuntu 22.04 did run into an issue because the OS upgrade changes one of the Duo Authentication Proxy's dependencies. https://help.duo.com/s/article/7843?language=en_US The solution was fairly simple: just to remove the proxy software, reinstall it, and restore conf and log files from a backup.
Duo, not DUO.