Before the backup
It is recommended to stop Dispatcher Paragon services before database backup is performed.
The backup of databases shall be done at the same time to prevent inconsistency among databases.
- Stop all Dispatcher Paragon services in the whole environment (Management Servers, Site Servers) except the following (leave the services listed below running):
Dispatcher Paragon Bundled PostgreSQL (available if an embedded PostgreSQL DB is used)
- pgAdmin4
PostgreSQL Backup
Important information
All backup procedures should be consulted first with Database Administrator/Owner in case an external PostgreSQL database is used.
Please note that this is just a quick guide for pgAdmin tool. Latest documentation is always available on PostgreSQL web pages.
Backup using pgAdmin administration tool
- On the database server, run the pgAdmin administration tool
- On pgAdmin tool click on Add New server
- Fill SQDB6 in Name section and continue to Connection tab
- Fill the connection information of the database
- In browser window, double-click the newly added item to connect to the server
- Right-click in the database to backup and click the Backup... option
- Set a Filename of your choice
- Keep Format set as Custom
- Set the Role name as postgres
- Press the Backup button
- If everything is correct, a popup should appear with information that the procedure ended successfully
- You can check the log if you click on More details
Additional information
The backup process is executed by the tools using Python (embedded with PG Admin). The installer adds a path to Python libraries into the PATH system variable.
If the backup process fails and displays the Cannot locate Python36.dll error message, make sure that the "PATH" system variable contains the path to the "bin" folder of pgAdmin (for Embedded PostgreSQL, this path is "%SAFE_HOME%\PGSQL\pgAdmin 4\bin")
Repeat steps 1. - 11. for SQDB6_DWH database on the appropriate server
- Repeat steps 1. - 11. for SQDB6_IMS database on the appropriate server
- Repeat steps 1. - 11. for SQDB6_YPS database on the appropriate server
Backup using command line
If you prefer to use command line and Dispatcher Paragon was installed with the embedded PostgreSQL database, use the following commands:
"%SAFEQ_HOME%\PGSQL\bin\pg_dump.exe"
-
-host
localhost -
-port
5433 -
-username
"postgres"
-
-role
"postgres"
-
-format
custom -
-blobs
-
-verbose
-
-file
"SQDB6.backup"
"SQDB6"
"%SAFEQ_HOME%\PGSQL\bin\pg_dump.exe"
-
-host
localhost -
-port
5433 -
-username
"postgres"
-
-role
"postgres"
-
-format
custom -
-blobs
-
-verbose
-
-file
"SQDB6_IMS.backup"
"SQDB6_IMS"
<
# Use the command below only when Data Warehouse deployment is used #>
"%SAFEQ_HOME%\PGSQL\bin\pg_dump.exe"
-
-host
localhost -
-port
5433 -
-username
"postgres"
-
-role
"postgres"
-
-format
custom -
-blobs
-
-verbose
-
-file
"SQDB6_DWH.backup"
"SQDB6_DWH"
<
# Use the command below only when using Payment System #>
"%SAFEQ_HOME%\PGSQL\bin\pg_dump.exe"
-
-host
localhost -
-port
5433 -
-username
"postgres"
-
-role
"postgres"
-
-format
custom -
-blobs
-
-verbose
-
-file
"SQDB6_YPS.backup"
"SQDB6_YPS"
You might need to enter password for the "postgres" user after executing the command.
Backup will be created in the folder from which the command is run.
For running these commands in PowerShell, replace %SAFEQ_HOME%\PGSQL\bin\pg_dump.exe with &$env:SAFEQ_HOME\PGSQL\bin\pg_dump.exe
%SAFEQ_HOME%\PGSQL is the default location of the PostgreSQL that comes embedded in Dispatcher Paragon.
When using an external PostgreSQL server, you need to locate the executable "pg_dump.exe" which comes as part of PostgreSQL installation and adjust the script accordingly:
- replace the "%SAFEQ_HOME%\PGSQL\bin\pg_dump.exe" with path to "pg_dump.exe"
- replace also --host and --port values if needed
After the backup
Start Dispatcher Paragon services with Automatic startup type on Management Servers again
Do not start Dispatcher Paragon Spooler Controller Group Service. It will be started by Dispatcher Paragon Spooler Controller service when proper configuration is ready.
- Start Dispatcher Paragon Management Service first
Start remaining Dispatcher Paragon services in no particular order
Start Dispatcher Paragon services with Automatic startup type on Site Servers again
Do not start Dispatcher Paragon Spooler Controller Group Service. It will be started by Dispatcher Paragon Spooler Controller service when proper configuration is ready.
- Start Dispatcher Paragon Spooler Controller first
- Start remaining Dispatcher Paragon services in no particular order