Yes, you can do that. Make backups (of the database and the config files), upload the new version in a more secure setup (preferably putting the sensitive pieces outside of the webroot or at least within a password-protected folder).
Then run the install script. Instead of upgrade, choose the Migrate option. You can either migrate an existing database or use an SQL file from your backup. The install script will do the upgrade and adjust any paths to the new setup.
bye, Dirk