Upgrading from an older version than 3.4.0 requires upgrading to 3.4.0 first. Below are the instructions on how to perform the upgrade.
First start a screen session as this upgrade may take a long time with several database migrations:
screen -S upgrade
Remove the flag file if you tried upgrading to the newest version and it failed:
sudo rm /DATA/unomaly_UPGRADING
Download 3.4.0 and install it (this will take a while):
sudo sh unomaly-3.4.0.run
Finally update to the latest version (3.5.0 in this example):
sudo sh unomaly-3.5.0.run
Upgrading to the more recent versions should work correctly after this.