Skip to main content

Exporting and Importing the Database to a New Server

Overview​

This article describes how to export the Netwrix Privilege Secure for Access Management database and import it to a new Privilege Secure server.

The data transferred includes:

  • PostgreSQL Database
  • RDP/SSH Recordings
  • Configuration files
  • Encryption keys

Instructions​

Install on the New Server​

  1. Install Privilege Secure on the new server.

Export from 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
  2. Create an archive of the PostgreSQL database by running the indicated command:

    Compress-Archive -Path C:\ProgramData\Stealthbits\Postgres12 -DestinationPath C:\Temp\pg_data.zip -CompressionLevel Optimal

  3. Export the Privilege Secure 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

  4. Create an archive of the Privilege Secure configuration files:

    Compress-Archive -Path C:\ProgramData\Stealthbits\PAM -DestinationPath C:\Temp\nps_config.zip -CompressionLevel Optimal

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

Import on the 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
  2. Decompress the configuration files from the original server:

    Expand-Archive -Path c:\temp\nps_config.zip -DestinationPath c:\ProgramData\Stealthbits -Force

  3. Decompress the PostgreSQL files from the original server:

    Expand-Archive -Path C:\temp\pg_data.zip -DestinationPath C:\ProgramData\Stealthbits -Force

  4. 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

  5. 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