Restoring a SES Evolution database
If a database fails or becomes corrupted, you can restore a backup.

-
The Windows account used for the backend identity when installing SES Evolution must be a domain account.
-
The backup to restore must have been created with the same version as the version of SES Evolution in production. For example, restoring a SES Evolution 2.6.1 database backup on a version 2.6.3 will prevent SES Evolution from starting. Hence the point in backing up databases after each SES Evolution update. For more information, see Performing ad hoc database backups.
-
The administration console, the agent handlers, and the SES Evolution backend must be stopped in this sequence before restoring.

-
In SQL Server Management Studio, use the Stormshield_RestoreDatabase procedure with the following parameters suited to your environment:
Parameter | Description |
---|---|
DatabaseName |
Name of the database to which the file will be restored. The value can be EsAdministration or EsLogs. CAUTION
|
BackupFilePath |
Absolute path of the backup file to restore. This file must exist for the procedure to run properly. Network paths are accepted, e.g. \\storage\backups\EsAdministration_2024-07-14_22-30-42_full.bak. |
DestinationDataDirectory (optional) |
Absolute path of the directory to which the SQL Server data files will be restored. When this parameter is used, this directory must exist for the procedure to run properly. |
DestinationDataDirectory (optional) |
Absolute path of the directory to which the SQL Server transaction log files are restored. If this parameter is used, this directory must exist for the procedure to run properly. |
For example, run the following command:
EXECUTE master.dbo.Stormshield_RestoreDatabase
@DatabaseName = 'EsAdministration',
@BackupFilePath = 'E:\Backups\EsAdministration\EsAdministration_2024-07-14_22-30-42_full.bak';

To restore a SES Evolution database onto another SQL Server or instance, the destination instance must be in a later or equal version of SQL Server.
Follow this procedure for each database, starting with the administration database:
-
On the target SQL Server instance, run the Stormshield_Database_Maintenance_Procedures.sql script.
-
Restore the database on the target SQL Server:
-
If the target instance is running on a different machine, run this SQL command:
EXECUTE master.dbo.Stormshield_RestoreDatabase
@DatabaseName = 'EsXxx',
@BackupFilePath = 'E:\Backups\EsXxx\EsXxx_2024-07-14_22-30-42_full.bak';where
Xxx
should be replaced withAdministration
orLogs
. -
To customize the destination directories for the SQL files, specify them manually in the command:
EXECUTE master.dbo.Stormshield_RestoreDatabase
@DatabaseName = 'EsXxx',
@BackupFilePath = 'C:\backups\EsXxx_2024-07-14_22-30-42_full.bak',
@DestinationDataDirectory = 'F:\Data',
@DestinationLogDirectory = 'G:\Logs'; -
If the target machine contains several other instances, specify the destination directory explicitly to ensure the files are restored to the directories matching the appropriate instance. For example, for an instance named DESTINATION:
EXECUTE master.dbo.Stormshield_RestoreDatabase
@DatabaseName = 'EsXxx',
@BackupFilePath = 'C:\backups\EsXxx_2024-07-14_22-30-42_full.bak',
@DestinationDataDirectory = 'C:\Program Files\Microsoft SQL Server\MSSQL15.DESTINATION\MSSQL\DATA',
@DestinationLogDirectory = 'C:\Program Files\Microsoft SQL Server\MSSQL15.DESTINATION\MSSQL\DATA';
-
-
Run the following command on the restored database to automatically recreate the IDs required for SES Evolution operation:
EXECUTE master.dbo.Stormshield_RestoreLoginUserMappings;
-
If you are restoring the log database, update the reference to its instance in the SES Evolution administration database restored beforehand. For this, run the following command on the instance hosting the administration database:
EXECUTE master.dbo.Stormshield_ChangeLogsDatabaseInstance @NewInstanceName = 'LOGS_SERVER_ADDRESS\LOGS_INSTANCE_NAME';
where
LOGS_SERVER_ADDRESS
andLOGS_INSTANCE_NAME
are the address and SQL instance of the log database. For default instances (which are not named), the address alone, without backslash, is sufficient:LOGS_SERVER_ADDRESS
. -
Update the address of the new SQL Server instance in the SES Evolution configuration files:
-
Back up the following files on each backend:
C:\Program Files\Stormshield\SES Evolution\Backend\Api\web.config
C:\Program Files\Stormshield\SES Evolution\Backend\PublicApi\web.config -
In each of these files, modify the lines:
<add name="Administration" connectionString="Data Source=ADM_SERVER_ADDRESS\ADM_INSTANCE_NAME;Initial Catalog=EsAdministration;..." ... />
<add name="Logs" connectionString="Data Source=LOGS_SERVER_ADDRESS\LOGS_INSTANCE_NAME;Initial Catalog=EsLogs;..." ... />to ensure the
ADM_SERVER_ADDRESS
,ADM_INSTANCE_NAME
,LOGS_SERVER_ADDRESS
, andLOGS_INSTANCE_NAME
values match the addresses and SQL instances of the administration and log databases.For default instances (which are not named), the address alone, without backslash, is sufficient:
ADM_SERVER_ADDRESS
andLOGS_SERVER_ADDRESS
.
-