SoftActivity

Migrating legacy log (salog) into new SoftActivity Webapp

Prior to version 11.0 of Activity Monitor the logs used to be sorted in a database consisting of a single file with .salog extension. Screenshots are stored in SCR folder located next to the .salog file.

Starting with Activity Monitor 11.0 it uses new enterprise class PostgreSQL database server for storing logs. Customers can keep .salog log files and view them in our legacy Log Viewer desktop application.

Although there is an option to migrate your legacy .salog log file into the new PostgreSQL database, so that they can be viewed in SoftActivity webapp. Follow these steps to migrate the logs:

  • Setup your webapp and the database settings properly in Activity Monitor Options and verify that new logs appear in your web console.
  • Login to the web console, go to Application Settings and set a desired data retention interval, such as a few months. Otherwise it will store logs indefinitely and fill the server’s hard drive
  • Stop SalogSrv service temporarily, to pause downloading of new logs while the import runs
  • Open Command Prompt As Administrator on the machine with Activity Monitor Server installed
  • Run this command to navigate it to Activity Monitor folder :
     cd "%ProgramFiles%\SoftActivity\Activity Monitor"
  • Run this command to start data migration from .salog file to PostgreSQL database:
     pgexport.exe --cfg=C:\ProgramData\Salog\sa_webapp.cfg --salogfile="C:\Users\user\Documents\Activity Monitor Logs\log_db.salog" --scrsource="C:\Users\user\Documents\Activity Monitor Logs\SCR" --scrdest="C:\ProgramData\Salog\data\scr-web" --log=all

    ,where
    cfg – location of the webapp config file. Do not change this
    salogfile – legacy database .salog file that you want to migrate to the webapp. Usuaully, the legacy log file can be found in Documents\Activity Monitor\Logs
    scrsource – SCR folder containing screenshots, referenced in the above legacy salog file. Usually it’s located next to the .salog file. All screenshots will be moved to the new folder specified in /scrdest
    scrdest – Central Storage folder for screenshots, used in the webapp. You can see it in Options – Database tab. Copy it from here:

  • Note: scrsource and scrdest parameters are optional. If either of them is not provided, no screenshots will be moved. Destination folder may or may not exist. If it exists, the jpg files will be moved into the existing folder. Otherwise new folder will be created.
  • Wait a few minutes until pgexport.exe succeeds copying all data. It may take a long time for a large volume of screenshots, especially when migrating screenshots to a different drive, or a network drive.
    Note: On very large databases it may take several hours for import to complete. Sometime you might want to leave it running overnight.
  • In case the command return any errors, those issues need to be addressed. Then re-run the command
  • Start SalogSrv service in order to continue downloading new logs from the monitored computers.

Additional Notes:

  • you need to have read/write/delete access under your user account to the files and folders specified in the above command in salogfile, scrsource and scrdest parameters
  • in case the legacy database is encrypted (asks for a password when opened in legacy Log Viewer), you will need provide your previous password in salogpass command line parameter:
    –salogpass=mypassword