You should be okay if you just preserve /opt/zimbra.
Copy all of /opt/zimbra (when Zimbra is shut down) to another system or partition.
After the OS reinstall and upgrade, reinstall Zimbra (same version) and then copy back /opt/zimbra
For more details, I highly recommend reading through the following link:
Ajcody-Notes-Server-Move - Zimbra :: Wiki