How to restore a backup copy of the Integration Server database and parameters in Kaspersky Security for Virtualization Light Agent
Show applications and versions that this article concerns
- Kaspersky Security for Virtualization 6.0 Light Agent
- Kaspersky Security for Virtualization 5.2 Light Agent
If the Integration Server works incorrectly after upgrading Kaspersky Security for Virtualization to version 6.0, you can switch to the previous version.
You can restore a backup copy of the Integration Server database and parameters manually or using a script.
Administrator permissions are required to perform the instructions below.
Before restoring:
- If you saved the backup copy in the default folder %ProgramData%\Kaspersky Lab\VIISLA\Backup\, copy it to another location outside the %ProgramData%/Kaspersky Lab\VIISLA\ folder.
- If the management components of Kaspersky Security for Virtualization 6.0 Light Agent are installed on the device, remove them without saving the data.
- If the management components of Kaspersky Security for Virtualization 5.2 Light Agent are installed on the device, remove them without saving the data.
- Install the management components of Kaspersky Security for Virtualization 5.2 Light Agent.
How to restore using the script
By using the script, you agree to the License Agreement. The text of the License Agreement can be found in the license.txt file in the archive with the script.
To restore the Integration Server database and parameters using the script:
- Download the recover_viis_config_from_backup.zip archive and extract the files from it.
- Open the PowerShell command line with administrator’s rights.
- Run the command:
recover_viis_config_from_backup.ps1 "<path to the folder with backup copies>"
<path to the folder with backup copies> is a path to the folder where the Integration Server certificate and the backup copy of the database and parameters are stored.
For example, if you saved the backup copy to the C:\Backup folder, the command will look like this:
recover_viis_config_from_backup.ps1 "C:\Backup\VIISData(1)"
- Start the Integration Server console and specify the port to connect to the Integration Server.
Port 7271 is used by default. - Specify the parameters to connect to the virtual infrastructure using the SVM Management Wizard.
To do so, start the SVM Management Wizard in the SVM Management section of the Integration Server Console. Select any action and proceed to the infrastructure selection step, for example, Selecting infrastructure for SVM deployment.
The backup copy of the Integration Server database and parameters will be restored.
How to restore manually
Before restoring the Integration Server database and parameters, find out and save the port number for connecting to the Integration Server (VIISPort) and the Integration Server certificate blueprint (VIISCertHash):
- Open the folder with backup copies where the Integration Server certificate is located.
- In the viislaservice.exe.config configuration file, find the text below and save the port number:
<add key="address" value="https://localhost:<VIISPort>"/>
- Run the command and save the certificate blueprint:
echo. > NUL | certutil.exe ViisCertificate.pfx | findstr /c:"Cert Hash(sha1)" | for /f "tokens=3-22" %f in ('more') do @echo %f%g%h%i%j%k%l%m%n%o%p%q%r%s%t%u%v%w%x%y
To restore the Integration Server database and parameters manually:
- If the Integration Server is running, stop it:
net stop viisla
- Empty the %ProgramData%\Kaspersky Lab\VIISLA folder.
To do so, grant the current administrator account the rights of the owner of the %ProgramData%\Kaspersky Lab\VIISLA folder and its contents. - Copy from the backup folder to the %ProgramData%\Kaspersky Lab\VIISLA\db\ folder the following databases:
- viisla.db
- protectionPeriods.db
- Grant the NT SERVICE\VIISLA user full access to the %ProgramData%\Kaspersky Lab\VIISLA folder and its contents.
- Copy from the backup folder to the %Program Files(x86)%\Kaspersky Lab\Kaspersky VIISLA\ folder the configuration files:
- viislaservice.exe.config
- NLog.config
- Find the ViisCertificate.pfx certificate in the backup folder and install it by double-clicking on it.
In the Certificate Import Wizard, select the parameters:- StoreLocation: LocalMachine
- Certificate store: Personal
The certificate will be removed from the specified storage when the Kaspersky Security for Virtualization Light Agent management components are removed.
- Bind the Integration Server port to the certificate:
- Find out the current port number:
netsh http show sslcert ipport=0.0.0.0:<VIISPort>
- If the certificate is bound to the specified port, unbind it:
netsh http delete sslcert ipport=0.0.0.0:<VIISPort>
- Delete ACL:
netsh http delete urlacl url=https://*:<VIISPort>/
- Add a new binding:
netsh http add sslcert ipport=0.0.0.0:<VIISPort> certhash=<ViisCertHash> appid={656f89a9-76c3-417c-a857-9b42bd67d298}
- Add ACL:
netsh http add urlacl url=https://*:<VIISPort>/ user="NT AUTHORITY\NETWORK SERVICE" listen=yes delegate=no sddl=D:(A;;GX;;;NS)
- Open the registry editor and find the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\KasperskyLab\VIISLA\Server\1.0.0.0\SSL1 branch.
- Set the Integration Server port number for the Port parameter.
- Find out the current port number:
- Start the Integration Server:
net start viisla
- Start the Integration Server console and specify the port to connect to the Integration Server.
- Specify the parameters to connect to the virtual infrastructure using the SVM Management Wizard.
To do so, start the SVM Management Wizard in the SVM Management section of the Integration Server Console. Select any action and proceed to the infrastructure selection step, for example, Selecting infrastructure for SVM deployment.
The backup copy of the Integration Server database and parameters will be restored.