Portal data both for ONLYOFFICE Workspace and ONLYOFFICE Workspace Enterprise Edition is stored in the /var/www/onlyoffice/Data
folder, so that the data should be picked up automatically after updating. As a precaution, you can perform the backup of the folder that contains portal data.
After all the data is backed up, please check the portal for correct launch and remember some user data to be able to check it after the upgrade.