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:
- PostgreSQL Database
- RDP/SSH Recordings
- Configuration files
- Encryption keys
Instructions
On the new server
- Install Netwrix Privilege Secure on the new server.
On the existing server
- 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
-
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 -
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 -
Create an archive of the NPS 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.
On new server
- 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
-
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-12
Start-Service W3SVC
Start-Service SbPAM* -Force