Steps to take PGSQL Dump Backup and Restore

Steps to take PGSQL Dump Backup and Restore

PGSQL – DUMP – Backup Procedure :


Login to the MSP application server and perform the below steps,

1. Start the application


To take Postgres (Psql) Dump :


3. Open a command prompt and navigate into <ServiceDeskPlus-MSP>/pgsql/bin directory.


4.  Execute -> pg_dump -U {user-name} {source_db} -f {dumpfilename.sql}


Using the above step if the dump is not created, then try the below,


pg_dump -U postgres -h 127.0.0.1 -p 65432 servicedesk > test.sql


This will create a file named “test,sql” <ServiceDeskPlus-MSP>/pgsql/bin.


Take a Copy of this file.


To restore :


1. Install the application in a different machine


2. Start and shut down the application once.


Paste the taken test.sql under <ServiceDeskPlus-MSP>/pgsql/bin directory.


3. execute – startDB.bat 65432

4. Open a command prompt and navigate into <ServiceDeskPlus-MSP>/pgsql/bin directory.


psql -h localhost -p 65432 -U postgres -d servicedesk


5.Execute query \c postgres


6. Execute drop database servicedesk;

7. create database servicedesk;


8. Execute \q or quit.


9. Now execute ->psql -U {user-name} -d {desintation_db}-f {dumpfilename.sql}


10. Once the process is completed. Execute stopdb.bat 65432


11. Run the application and check the configuration


          • Related Articles

          • Steps for taking Trimmed Backup

            ServiceDesk Plus – MSP is designed in such a way that the file attachments are not stored in the database. The attachments are stored in the file attachments folder of the installation directory (C:\ManageEngine\ServiceDeskPlus-MSP). If there are ...
          • How do I convert the database from MSSQL to PGSQL ?

            Kindly plan to perform this process ONLY during Non Operational hours. You can do this process in the same server that you have SDP MSP installed. Step 1:  Stop the application and Take a backup of the existing data in the application. Navigate to ...
          • How do I convert the database from PGSQL to MSSQL?

            Step 1: Stop ManageEngine ServiceDeskPlus – MSP service. Step 2: Take a backup of the existing data and configuration under PGSQL database. Open CMD as an admin and execute  command to start the data backup. ...
          • Restore fails due to CRC error

            When the Backup is Password protected, then during restore, the application is unable to unzip the backup file due to CRC error below, Default Backup password: SDP123! java.io.IOException: invalid CRC (MAC) for file: ...
          • Unable to restore database : zip file too large

            In oldest versions like 8.0, 8.1. 8.2, 8.3, you may come across restore issues when the backup file is huge (even more than 3 or 4GB). In those cases, this article would be helpful. Scenario 1: If you come across this when you are trying to setup UAT ...