Skip to main content

Exporting and Importing the Database to a New Server

Overview

This article outlines the process of exporting your Netwrix Privilege Secure database, and importing it to a new Privilege Secure server.

The data transferred includes:

  1. PostgreSQL Database
  2. RDP/SSH Recordings
  3. Configuration files
  4. Encryption keys

Instructions

On the new server

  1. Install Netwrix Privilege Secure on the new server.

On the existing server

  1. Stop the following services on the server by running the indicated PowerShell commands:
Stop-Service SbPAM* -Force
Stop-Service W3SVC
Stop-Service postgresql-x64-12
  1. Create an archive of PostgreSQL database by running the indicated command:
    Compress-Archive -Path C:\ProgramData\Stealthbits\Postgres12 -DestinationPath C:\Temp\pg_data.zip -CompressionLevel Optimal

  2. Export the NPS encryption keys, and capture the password generated by the export (note: the keys.exp file created in this step is sensitive and should be deleted after the import is complete): "C:\Program Files\Stealthbits\PAM\KeyTools\SbPAM.RotateKey.exe" export -n c:\temp\keys.exp

  3. Create an archive of the NPS configuration files:
    Compress-Archive -Path C:\ProgramData\Stealthbits\PAM -DestinationPath C:\Temp\nps_config.zip -CompressionLevel Optimal

  4. Copy pg_data.zip, keys.exp, and nps_config.zip to the new server.

On new server

  1. Stop the following services on the server by running the indicated PowerShell commands:
Stop-Service SbPAM* -Force
Stop-Service W3SVC
Stop-Service postgresql-x64-12
  1. Decompress the configuration files from the original server:
    Expand-Archive -Path c:\temp\nps_config.zip -DestinationPath c:\ProgramData\Stealthbits -Force

  2. Decompress the PostgreSQL files from the original server:
    Expand-Archive -Path C:\temp\pg_data.zip -DestinationPath C:\ProgramData\Stealthbits -Force

  3. Import the key files from the original server (note: the keys.exp file is sensitive and should be deleted after the import is complete):
    "C:\Program Files\Stealthbits\PAM\KeyTools\SbPAM.RotateKey.exe" import -f -n c:\temp\keys.exp

  4. Start the following services on the server by running the indicated PowerShell commands:

Start-Service postgresql-x64-12
Start-Service W3SVC
Start-Service SbPAM* -Force