The following steps describe a correct procedure to migrate Safetica database and Safetica server.
Prerequisites
Available SQL Management Studio for both old and new SQL server.
Maintenance scripts: delete_license.dcf, delete_connections.dcf.
Steps
- Deny clients from sending new logs and requests to the Safetica Management Service
- Run CMD as administrator
- Redirect to C:\Program Files\Safetica Management Service
- Execute command: STAService.exe -clientport 44388
- Execute command: restart.bat
- Keep CMD opened
- Run maintenance scripts and set up a redirect for clients
- Open the Safetica Management Console and log in
- Go to Maintenance -> Database management -> Maintenance, section Maintenance scripts
- Run both scripts (delete_license.dcf, delete_connections.dcf)
- Delete_license script is available: Delete_license
- Delete_Connection script is available: Delete_connections
- Go to the Dashboard, right-click the user-tree root, click the “Redirect” option to define an address to the new Safetica server.
- Transfer database files from the old SQL server to the new one.
//You can do so by copying already existing database files or using backup/restore feature.
- Open MS SQL Management Studio and connect to the current database server
- Right-click on database “safetica_data”, select “Tasks – Detach”
- Check the box “drop connections” and confirm
- Copy files: “safetica_data”, “safetica_data_log” and “[safetica_data_FG]” to the new SQL server
//Files are usually located at C:\Program Files\Microsoft SQL Server\MSSQL13.SAFETICA\MSSQL\DATA or similar path. Location may vary, due to the custom installation parameters and SQL version.
- Attach/restore the database to a new SQL server
- Open MS SQL Management Studio and connect to a new SQL server.
- Right-click on Databases and select “Attach – add”
- Navigate to the location of copied databases and select “safetica_data”
- Install Safetica server components on the new server
- Run the universal installer, choose option Manual installation a proceed to start the installation of the Safetica Management Service.
- During the SQL server selection, select the option “Custom SQL server” and then define the connection string to the new SQL server.
- Install Safetica Management Console, log into the new Safetica server and go through the initial wizard.
- Re-enable the communication with clients on the old Safetica server
- Execute command: STAService.exe -clientport 4438
- Execute command: restart.bat
- Keep old Safetica server running until all required clients are redirected to the new server.