SoftActivity

SoftActivity Monitor Server migration. Instructions for admin

How to move Activity Monitor server to a new server machine. Following this procedure will move: the license, all logs and screenshots you see in the web console, managers’ accounts in the web console, settings in web console Admin Panel, Agents list in the console desktop app with all Agent settings. 

In this example we will be moving the installation from SERVER1 to a new SERVER2 machine. 

  • On SERVER1: stop SalogSrv and SawebSrv services to stop downloading new logs and serving the webapp. 
  • On SERVER1: open Activity Monitor admin console application, click File Menu – Export Agent list and export he agents list with all settings and passwords to an .xml file. 
  • On SERVER2: install Activity Monitor server of the same version as on SERVER1, including all components. Select Server Mode for installation. Select Data Folder on a local drive with the most free space available. For this example, we will select D:\SoftActivity Data as a data folder on the new server. It’s recommended to set the same password as on the old server, for easier data transfer. 
  • SERVER2: Launch Activity Monitor admin console application and enter your registration info in order to activate the license on your new server. 
  • SERVER2: Stop SalogSrv and SawebSrv services temporarily. 
  • SERVER2. Import Agents list. In Activity Monitor admin console desktop click File menu – Import Agents list, select the .xml file that has been previously exported on SERVER1. 

Create database dump

  • SERVER1: open Command Prompt and run this command to navigate to postgres\bin folder:
    cd "%ProgramFiles%\SoftActivity\Activity Monitor\postgres\bin" 
  • Run this command:
    pg_dump --file="C:\folder\softactivity.dump" --format=c -d postgres -h localhost -U softactivity

    , where –d postgres specifies your database name. Can be seen in database settings window. By default: postgres
    -U softactivity, user name used to connect to PostgreSQL database. By default, softactivity
    –file  specifies the file where the dump should be stored. The folder must be created in advance

  • It should ask for a database password. Enter your PostgreSQL database password, which is the password you have initially set when installing Activity Monitor on this server 
  • As a result of this command you should get softactivity.dump file 

Import the database dump

  • Copy softactivity.dump file from SERVER1 to SERVER2
  • SERVER2: open Command Prompt and run this command to navigate it to postgres\bin folder :
    cd "%ProgramFiles%\SoftActivity\Activity Monitor\postgres\bin" 
  • Run this command to create a new empty database:
    createdb -U softactivity -h localhost softactivity1

, where softactivity1 is the new database name
-U softactivity specifies the user name used to connect to the database 

  • Enter a new password to assign to this new database. Save the password for future reference
  • Run this command to import our dump file into the new database:
    pg_restore -d softactivity1 -h localhost -U softactivity --jobs=8 "C:\folder\softactivity.dump"

    with your previously created .dump file that you want to import
    Note: some errors like “role postgres does not exist” are ok and can be ignored

Copy the screenshots folder

  • SERVER1: Open Activity Monitor Options – Database – Database Configuration.
  • Copy full path of Central Storage for Screenshots from this window into the Address bar of  Windows Explorer.  By default, the folder is C:\ProgramData\Salog\data\scr-web 
  • Copy all contents of this folder with all folders to the new SERVER2 inside the destination data folder: D:\SoftActivity Data\scr. Warning! This can take a long time, as the folder may contain many GB’s of JPG files.
  • Open Database Configuration window and set the Central Storage for Screenshots to D:\SoftActivity Data\scr
  • In Database Configuration select your new softactivity1 db from the Database drop-down. Click Apply

Finalize and check the results

  • Click Check Connections and Check Access buttons in database configuration window. Try connecting in browser to the web console. Check Event Viewer for possible new errors from SoftActivity services.  
  • In case of errors check the Troubleshooting steps
  • Uninstall Activity Monitor from the old SERVER1, and (optional) delete the data folder.