Backup of databases

This page describes procedure how to backup Dispatcher Paragon databases. Dispatcher Paragon solution uses main databases for its basic operation which are named SQDB6 and SQDB6_IMS. If Dispatcher Paragon Payment System is installed, the database SQDB6_YPS is also part of the YSoft solution. For a database backup please follow the instructions bellow according to the database type used.

Preparation

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.

  1. Stop all Dispatcher Paragon services in the whole environment (Management Servers, Site Servers) except the following (leave the services listed below running):

    1. Dispatcher Paragon Bundled Etcd

    2. Dispatcher Paragon Bundled PostgreSQL 9.4 (available if an embedded PostgreSQL DB is used)

      1. You can use the following PowerShell script to perform the task:

        Get-Service *YSoft* | Where-Object {$_.Name -ne 'YSoftPGSQL' -and $_.Name -ne 'YYSoftPGSQL' -and $_.Name -ne 'YSoftEtcd'} | Stop-Service

Embedded PostgreSQL backup

You can use pgAdmin administration tool the same way as described for External PostgreSQL backup or you can use similar commands to backup SQDB6, SQDB6_IMS and SQDB6_YPS databases:

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.

Replace %SAFEQ_HOME%\PGSQL\bin\pg_dump.exe with &$env:SAFEQ_HOME\PGSQL\bin\pg_dump.exe when using PowerShell

"%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 using Dispatcher Paragon 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"

External PostgreSQL backup

All backup procedures should be consulted first with Database Administrator/Owner.

Please note that this is just a quick guide for pgAdmin tool. Latest documentation is always available on PostgreSQL web pages.

  1. On the database server, run the pgAdmin administration tool

  2. In Object browser window, double-click the SafeQ PostgreSQL server connection item and connect to the server

  3. Right-click the SQDB6 database and click the Backup... option

    images/download/attachments/153630680/PGbackup.png
  4. Select Filename of your choice

  5. Keep Format set as Custom

  6. Select Rolename postgres

  7. Press the Backup button

    images/download/attachments/153630680/PGbackup2.png
  8. Click the Messages tab

  9. Check that backup ended with the Process returned exit code 0 message, any other code means error and backup must be repeated

    images/download/attachments/153630680/PGmessages.PNG
  10. Repeat steps 3. - 9. for SQDB6_IMS database

  11. Repeat steps 3. - 9. for SQDB6_YPS database (if using Dispatcher Paragon Payment System)

External MS SQL backup

All backup procedures should be at consulted first with Database Administrator/Owner.

Please note that this is just a quick guide for MS SQL Server Management Studio. Latest documentation is always available on Microsoft web pages.

  1. On the database server, run Microsoft SQL Server Management studio

  2. Click File - Connect to Object Explorer

  3. Choose a Database engine as a Server type and connect to the database server

  4. In the Object Explorer (menu on the left) click Databases

  5. Right-click the SQDB6 database and select the Tasks > Shrink > Database ... option and proceed using OK button

    images/download/attachments/153630680/MSshrink.PNG

  6. Right-click the SQDB6 database and select the Tasks > Back up ... option

  7. Select the destination of your choice

    images/download/attachments/153630680/MSbackup.PNG

  8. Click OK and wait until the backup is successfully finished

    images/download/attachments/153630680/MSsucess.PNG

  9. Repeat steps 5. - 8. for SQDB6_IMS database

  10. Repeat steps 5. - 8. for SQDB6_YPS database (if using Dispatcher Paragon Payment System)

After the backup

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

    1. Start Dispatcher Paragon Management Service first

    2. Start remaining Dispatcher Paragon services in no particular order

      1. You can use the following PowerShell script to perform the task

        Get-Service *YSoft* | Where-Object {$_.Name -ne 'YSoftSQ-SPOCGS'} | Start-Service

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

    1. Start Dispatcher Paragon Spooler Controller first

    2. Start remaining Dispatcher Paragon services in no particular order

      1. You can use the following PowerShell script to perform the task

        Get-Service *YSoft* | Where-Object {$_.Name -ne 'YSoftSQ-SPOCGS'} | Start-Service