Docker

HES update - Docker

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.16.X, 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.

Create folder for backup

sudo mkdir /opt/HES.old

Backup the Database (Optimal (for possible further recovery)):

  • MySQL Database:

The following command will create a copy of the database (dump) in file hesdb.sql in /opt/HES.old directory (on host) from container with name hes-mysql:

cd /opt/HES/
sudo sh -c "docker exec hes-mysql /usr/bin/mysqldump -u root --password=password hesdb > /opt/HES.old/hesdb.sql"
  • MS SQL Database:

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

cd /opt/HES/
sudo docker exec -it hes-mssql  /opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P "C00ll_Passwrd_here"  -Q "BACKUP DATABASE [hesdb] TO DISK = N'/var/opt/mssql/data/hesdb.bak' WITH NOFORMAT, NOINIT, NAME = 'db-full', SKIP, NOREWIND, NOUNLOAD, STATS = 10"

instead of "C00ll_Passwrd_here", enter your password here, which you specified in the /opt/HES/docker-compose.yml file

Stop containers:

(Optimal) Save the image of HES to a tar file (for possible further recovery):

Remove image of HES:

To upgrade the server to the latest version, run commands:

and Restart containers:

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

Stop containers:

Remove image of HES:

Restore the Database

  • My SQL:

Start MySQL container only:

Restore the MySQL Database from dump file:

  • MS SQL:

Start MS SQL container only:

Restore the MS SQL Database from bak file:

instead of "C00ll_Passwrd_here", enter your password here, which you specified in the /opt/HES/docker-compose.yml file

Restore old image of HES from tar file:

and start containers:

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

Last updated

Was this helpful?