Skip to content

Backup and Restore

Database Backup

SAS Enterprise Session Monitor uses a PostgreSQL relational database as its data server. You can use standard PostgreSQL data backup procedures to back up and restore the database used by SAS Enterprise Session Monitor. For example, you could use the pgAdmin graphical user interface for manual backups, or you can integrate the pg_dump utility into scheduled scripts for automatic backups.


SAS Enterprise Session Monitor ships with a modified version PostgresSQL 12.


The following instructions will assume an installation directory of /opt/sas/esm and that the default installation options for ports and credentials were accepted.

  1. Backup the database using the pg_dump utility:
    $ cd /opt/sas/esm/esm-server/pgsql/bin
    $ ./pg_dump -h localhost -p 15432 -U esm -d esm > /backup/path/esm-data-postgres.sql
  2. Archive the exported database file per your organization's standards.

Database Restore

The text file containing the SQL that is created by the database backup procedure can be read in by the psql utility. To restore a backup of the SAS Enterprise Session Monitor Server database:

  1. Run psql to import the SAS Enterprise Session Monitor server database:
    $ cd /opt/sas/esm/esm-server/pgsql/bin
    $ ./psql -h localhost -p 15432 -U esm -d esm < /backup/path/esm-data-postgres.sql

Last update: April 24, 2023
Created: April 24, 2023