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
- Install Privilege Secure on the new server.
Export from the Existing Server
-
Stop the following services on the server by running the indicated PowerShell commands:
Stop-Service SbPAM* -ForceStop-Service W3SVCStop-Service postgresql-x64-12 -
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 -
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 -
Create an archive of the Privilege Secure configuration files:
Compress-Archive -Path C:\ProgramData\Stealthbits\PAM -DestinationPath C:\Temp\nps_config.zip -CompressionLevel Optimal -
Copy
pg_data.zip,keys.exp, andnps_config.zipto the new server.
Import on the New Server
-
Stop the following services on the server by running the indicated PowerShell commands:
Stop-Service SbPAM* -ForceStop-Service W3SVCStop-Service postgresql-x64-12 -
Decompress the configuration files from the original server:
Expand-Archive -Path c:\temp\nps_config.zip -DestinationPath c:\ProgramData\Stealthbits -Force -
Decompress the PostgreSQL files from the original server:
Expand-Archive -Path C:\temp\pg_data.zip -DestinationPath C:\ProgramData\Stealthbits -Force -
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 -
Start the following services on the server by running the indicated PowerShell commands:
Start-Service postgresql-x64-12Start-Service W3SVCStart-Service SbPAM* -Force