Migration from 3.10 (or less) to 3.11 (or up) requires additional steps because we have significantly improved the data protection mechanism - now it is built on certificates and doesn't require entering the password manually on server start. Please follow these steps to update your HES:

  1. Update all Hideez Clients to 3.11, the new version can work with both old and new versions of the HES.

  2. Disable the Data Protection on the HES.

  3. Update the server using the following instruction.

  4. Enable Data Protection again.

Option 1 (using a script)

To update the server, you can use the script, which is located in the HES directory (/opt/HES default). You can run it either manually or through the web interface (by clicking on the server version). If an update is available, you will be prompted to update the server using a script. If you have changed the location of the server, the name of the service to run, you can manually update the necessary parameters in the script.

Option 2 (without using a script)

2.1. Stopping HES Service

  $ sudo systemctl stop HES

2.2. Backup the HES binaries and the configuration file

  $ sudo mv /opt/HES /opt/HES.old

2.3. Backup the Database

  • For MySQL database:

The following command will create a copy (dump) of the database hesdb in file hesdb.sql in /opt/HES.old directory:

  $ sudo mysqldump -uroot -p<MySQL_root_password>  hesdb > /opt/HES.old/hesdb.sql

change <MySQL_root_password> with your real password.

  • For Microsoft SQL Server database:

The following command will create a backup of the database hesdb in file hesdb.bak in /var/opt/mssql/data directory:

sqlcmd -S localhost -U SA -Q "BACKUP DATABASE [hesdb] TO DISK = N'/var/opt/mssql/data/hesdb.bak' WITH NOFORMAT, NOINIT, NAME = 'db-full', SKIP, NOREWIND, NOUNLOAD, STATS = 10"

2.4. Download a new version of the HES

$ cd ~
$ curl -O
$ tar -xvf linux_x64_latest.tar.gz
$ sudo mv HES /opt/

2.5. Restore the configuration file

  $ sudo cp /opt/HES.old/appsettings.Production.json /opt/HES/appsettings.Production.json

2.6. Restart the HES and check its status

  $ sudo systemctl restart HES
  $ sudo systemctl status HES

  ● - Hideez Enterprise Service
   Loaded: loaded (/usr/lib/systemd/system/; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-03-25 10:48:12 UTC; 16s ago
 Main PID: 4657 (HES.Web)
   CGroup: /system.slice/HES.service
           └─4657 /opt/HES/HES.Web

Mar 25 10:48:12 hesservertest systemd[1]: Started Hideez Enterprise Service.

After checking that the update was successful and everything works fine, you can delete copies of the database and server:

$ sudo rm -rf /opt/HES.old

If something goes wrong, you can restore the HES server using the following commands

Restore the folder with previous HES version:

$ sudo systemctl stop HES
$ sudo mv /opt/HES.old /opt/HES

Restore the Database:

  • For MySQL database:

$ sudo mysql -uroot -p<MySQL_root_password> hesdb < /opt/HES.old/hesdb.sql

change <MySQL_root_password> with your real password.

  • For Microsoft SQL Server database:

$ sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [hesdb] FROM DISK = N'/var/opt/mssql/data/hesdb.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5"

then restart HES:

$ sudo systemctl start HES

Last updated