Restore HyWorks Controller
The entire HyWorks deployment can be restored from the database backup. In this section, different scenarios and methods will be mentioned in detail.
Restoring the the the the Same HyWorks Controller Version
Restoring the HyWorks Controller using the backed-up database of the same version of the HyWorks Controller can be done by following the steps:
Placing a Backup File On the HyWorks Controller
Once the backup is completed successfully, the administrator needs to place the backup file in the proper format (.bak) in the correct location on the controller for a successful restore.
Backup File Format
HyWorks Controller stores the backup file in zip format in the following default location:
C:\Windows\TEMP\DB\BACKUP\
To restore a backup, the file must be extracted first. On extraction, the following type of file will be available for restore:
- For SQL Server Database: file should use .bak extension
Appropriate Directory For Restore
The location from where backup files can be restored depends on the HyWorks controller database configurations:
-
For HyWorks Controller with an SQL Server Database: When restoring HyWorks Controller with an SQL Server configuration, SQL Server should have write access to the directory containing the Backup file. This can be done using the following two methods:
-
Copy Backup File in SQL Server Backup Directory: The default backup directory does not have the required permission set. Thus, either the permission should be appropriately configured for SQL Server, or the file can be moved to the SQL Server Installation location -> Backup folder. The backup folder works correctly while restoring the HyWorks controller with the SQL server and should be preferred for restoration over any other location.
-
Configure Permissions on Backup File Directory.
-
Please refer to the Troubleshooting section for permission configuration guidelines.
Restore HyWorks Controller
Important
-
In production environments, the restore operation should be done very carefully.
-
Restored HyWorks Controller and source server (whose backup has been taken) should not run in the same network, as the session host server and other modules will start getting conflicting HyWorks Controller server configurations/ communications.
Prerequisites:
-
An appropriate backup file in the specified file format is available for restoration. Refer to the section BackUp File Format.
-
The backup file is available in the appropriate directory. Preferably, the backup file can be kept in the SQL Server backup folder itself if the SQL Server is installed locally on the same Windows server.
- Default location of SQL Server backup location:
C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\Backup
Restore Process using the Controller Setup wizard
Installing New Controller with Backed-up Database
Steps to configure a new controller by restoring the backup database:
-
Access the Windows server to be configured as a HyWorks Controller, which satisfies the following prerequisites.
-
All required prerequisites for HyWorks Controller, i.e., .NET 4.5, ASP.Net4.5, SSCE runtime, SQL Server, and Web Server (IIS roles) are configured.
-
The server does not have any HyWorks Controller installed, as the new HyWorks Controller must be created from an existing database backup.
-
-
Invoke HyWorks Installer with administrative rights on the server (where the HyWorks Controller is not installed)

-
The Setup wizard will be launched in fresh installation mode, displaying the Welcome screen.
-
Follow the on-screen instructions and proceed to the Service Database Configuration screen.
-
In Database Selection, select the Database type as Microsoft SQL Server if the backup file is from a SQL Server-based Controller. Provide the required information, i.e., Database Address, Port Number, Database Name, and Authentication details. Click Next to proceed.
-
Select the appropriate log server on the Log Database Configuration Screen, then click Next to proceed.
-
On the Restore Database screen:
-
Select the checkbox Do you want to restore the database?
-
Click Browse.
-
Browse to the location where the backup file (.bak for SQL Server database) is kept.
-
Select the backup file and click Next.

-
-
Follow onscreen instructions; click Install to start the installation.
-
Wait for the installation to complete.
-
After installation is complete, the new HyWorks Controller will be up and running with configurations as per the backup.
-
Verify the configurations from the HyWorks Controller Management Console.
Repair the existing HyWorks Controller and restore the backup
-
Access the Windows server to be configured as a HyWorks Controller, which satisfies the following prerequisites.
-
All required prerequisites for HyWorks Controller, i.e., .NET 4.5, ASP. Net 4.5, SSCE runtime, SQL Server, and Web Server (IIS roles) are configured.
-
The server already has an existing installed HyWorks Controller, which should be repaired to restore configurations.
-
-
Invoke HyWorks Installer with administrative rights on the server (where the HyWorks Controller is not installed).

-
The Setup wizard will be launched in Maintenance Mode, displaying options to Repair and Uninstall; select the option Repair, and Click Next.
-
The maintenance mode with the Repair option provides different configuration screens because many configurations are already handled during installation. After selecting the Repair option, the Administrator will be presented with the following screens:
-
Select the Components Selection screen.
-
Enter the Service Logon credentials.
-
-
On the Restore Database page:
-
Select the checkbox Do you want to restore the database?
-
Click Browse.
-
Browse to the location where the backup file (.bak for SQL Server databases) is stored.
-
Select the backup file and click Next.

-
-
Proceed to the Confirm screen in the Setup wizard by providing appropriate details on the different screens. Click Repair to start the repair operation as per the configured option and the provided database backup file.
-
After the completion of repair operations, the existing HyWorks Controller will be repaired with the database restored from the backup file.
-
Verify the configurations from the HyWorks Controller Management Console.
Configurations not supported or not recommended for restore
The following HyWorks Controller configuration types cannot be restored from a backup file, so restoring such production configurations should not be attempted.
-
HyWorks Controller configured to use SQL Server database on a Remote machine
The backup will fail with an error, and even when some backup files are available, the restore should not be attempted.
-
HyWorks Controllers in Two-node Cluster Configuration
It is not recommended to attempt to restore the primary or secondary HyWorks Controller in cluster configuration, though a backup can be taken successfully.
-
Recommendations for Clustered HyWorks Controllers:
-
Prepare a fresh HyWorks Controller with the same version. Add it to the cluster.
-
It will automatically sync the database from the primary HyWorks controller, eliminating the need for a restore.
-
-
-
Multi-node Setups:
Restoring the backup of the multi-node setup will include all node entries in the cluster configuration, resulting in a restored but corrupted cluster. To avoid any such failures, restoration in multi-node setups should be avoided.
Instead, the following recommendations can be used:
-
Recommendations for Multi-node Clustered HyWorks Controllers:
-
Session Nodes: Session nodes do not store any specific local data, so no restore is needed for any session node. Instead, the older ones can be removed, and new ones can be installed by pointing them to management nodes.
-
Management Nodes:
-
Secondary: - In an SQL-managed database high-availability setup, the secondary management node need not be restored; instead, a new management node can be installed that points to the existing database.
- In the HyWorks-managed database high-availability, the secondary management node should be freshly installed and should be added to the existing cluster; this will bring the new management node as the secondary in the cluster.- Primary: - For high availability in an SQL-managed database, make the current secondary the primary and remove the old primary management node from the cluster. This management node does not need to be restored; instead, a new management node can be installed and configured to point to the existing database.
-
In HyWorks, ensure database high availability by promoting the current secondary to primary and removing the old primary management node from the cluster. The new secondary management node should be freshly installed and added to the existing cluster; this will designate it as the secondary node.
-
-
Restore using SQL Server Management Studio
As mentioned in the Troubleshooting and the Important section, restoring the HyWorks controller using the Controller setup wizard will have some configuration issues:
- A new controller identical to the current one will be prepared, and all other modules in production may begin communicating with both HyWorks Controllers, which could cause issues.
- A new controller created from a backed-up database will have an entry for the old controller (from which the backup was taken), and it must be cleared after the controller is fully installed.
- Restoration cannot be performed for setups with SQL servers running on Windows servers other than the HyWorks Controller.
This method of restoring the HyWorks Controller backup using SQL Management Studio can help overcome these challenges.
Benefits:
- Initially, only the database will be restored, so no new HyWorks Controller will be live, similar to the one that was backed up.
- The administrator can clean up the database and remove residual entries from the source controller.
- The method can be used to restore the database for configurations that use SQL servers running on a server other than the HyWorks Controller server.
Prerequisites:
- The backup file from the source controller is available in the appropriate directory.
-
Preferably, the backup file can be kept in the SQL server backup folder itself.
- Default location of SQL Server backup location:
C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\Backup
Part# 1: Restoring Database
- Assuming the backup file is placed in the SQL server backup location.
- Launch SQL Server Management Studio.
- Connect to the SQL Server on which the backup has to be restored.
- Right-click on the left-hand object explorer, right-click on Databases.

- Select option Restore Database...
-
In the Restore Database window:
- Select the Device option.
- Click Browse to select the backup file.

- This will open a window box to add a backup file.
-
_Select backup devices and click Add**.

- It should open the SQL Server backup location by default and list the backup file copied in step #1.

- Select the file and click OK.
- The selected file should now appear in the Select backup devices window. Click OK to proceed.
- The administrator should navigate back to the Restore Database window, displaying all selected options.
- Click OK to continue restoring.

-
A progress bar will be displayed on top of the Restore Database window. Once completed, a message will be displayed confirming the database restoration.

Part# 2: Installing Controller with Restored DB
-
Copy HyWorks Controller setup on Windows Server with all prerequisites installed and configured.
-
Continue with the installation until the screen Service Database Configuration appears.
-
In the Service Database Configuration screen, provide the following details:
-
SQL Server details that were used to restore the database.
-
Provide the database name that matches the one restored.
-
Provide credentials (Source and destination SQL server configurations should be identical to avoid failures).
-
-
Click on Next to proceed.
-
A warning will be displayed, suggesting that a database with the same name already exists and asking whether it should be used.
-
Click YES to proceed with the installation.

-
-
Configure the log database as per recommendations.
-
When installing the controller with an existing database, do not select the restore database option on the **_Restore the Database screen.
-
All other installation configurations should also be done as per the deployment and recommendations.
-
Finish the setup - The Controller will be installed with a restored database.
Restoring a Higher Version of the Database with an Older Setup
Consider a situation where HyWorks hot-fixes are applied in a setup, and these hot-fixes also include database changes. Now, a database backup includes all the latest changes and can be considered a higher version.
The only available setup is without the hotfix and can be considered old. Using this installer to set up a controller may fail due to recent database changes.
The following steps can be followed in such cases to restore the database:
-
Restore the database on the target server using SQL Server Management Studio, following the steps in this section.
-
Now use the Controller's old installer (without hot-fixes) to install, but with a different database name than the one restored in step #1.
-
Install the latest hot-fixes on this setup.
-
Latest HyWorks Controller pointing to DB-2.
-
Backed-up database available on SQL Server.
-
-
Download and extract the latest Encrypt-Decrypt tool on the HyWorks Controller Server.
- Please contact the Accops Support team to obtain the tool.,
-
Run the Encrypt-Decrypt tool with administrator privileges:
-
Select mode as Controller.
-
Browse through the HyWorks Controller installation directory.
-
Locate and select the Edc.Service.exe from the Service folder.
-
Click on Decrypt Config to open the configuration file in decrypted mode.
-
Make the changes in the file to point it to the restored database.
-
Save the changes and close the file.
-
Click on Encrypt Config to re-encrypt the file.
-
Save the changes and close the file.
-
-
Restart the HyWorks Controller service to apply the changes.
Important
Important
-
License configurations will come from the database, but license keys have to be applied.
-
If you take a backup of multi-node setups and prepare a new setup on a different node, you must change the configuration of the other nodes to point to the restored database.
-
Other troubleshooting and important points can be referred.
Troubleshooting
Duplicate Controller Entry after restore
A secondary controller entry will be automatically added when HyWorks Controller is installed using a backup database using SQL Server as the database.
Procedure to remove secondary controller entry:
-
Log in to the HyWorks management console.
-
Navigate to Server > HyWorks Controller section.
-
Verify that the duplicate entries are present on the same server.
-
Click Delete displayed against one of the entries to remove the secondary controller entry.
Manually configure permission for SQL Server on the default Backup Directory
This one-time configuration can help achieve a convenient backup and restore from the default directory and avoid any possible permission issues on the server.
The intention is to provide full control to the MSSQLSERVER account on the default backup directory, which is,
C:\Windows\TEMP\DB\BACKUP\
Follow the steps below to configure permissions on this backup folder:
-
Log in to the server (The change must be made on the actual server, not through a network share).
-
Select the backup folder highlighted below, then right-click and select.

-
In Properties > Security >, click Edit.

-
In the Security window, click Add.

-
In the Add User window
-
Change the Locations to the local server name.
-
Type in NT SERVICE\MSSQLSERVER in the name box. (Do not click Check Names).
-
Click OK. You will then see a list of the matching service accounts. Select MSSQLSERVER, and click OK to accept the selection.


-
You should see the service account listed in the security settings, and you can adjust the permissions accordingly.