1. Home
  2. Docs
  3. How It Works
  4. How to Backup/Restore Dat...
  5. PostgreSQL

PostgreSQL

For PostgreSQL, the backup is created using the pg_dump utility.

pg_dump.exe  --username="postgres" --dbname="AdventureWorks" --file=c:\Path\To\Backup\AdventureWorks202403291207.sql

This utility creates a logical backup, the file format of which depends on the settings that are used in the advanced backup job options.

The restore is performed using the pg_restore utility or psql depending on the backup format.

psql.exe --username="postgres" --dbname="AdventureWorks" < c:\Path\To\Backup\AdventureWorks202403291207.sql

To view the complete commands (with all parameters used), click Tools – Advanced Log… and enable the Trace level. Next, perform the backup or restore operation, and search the logs for the substring “Dump. Command” or “RestorePlain. Args.” These lines will contain all executions of pg_dump.exe and psql.exe.

Also, if you click the “info” button in the connection settings, you will see the command used to connect to the database. If you encounter connection issues, you can manually execute this command via the command line to identify the cause of the problem.

psql.exe, pg_dump.exe and pg_restore.exe are installed along with the application files in the directory C:\Program Files (x86)\SQLBackupAndFTP\DBMS\PostgreSQL\.

If you encounter version compatibility issues, you can manually specify the path to the binaries in the connection settings. You can download them from the official website.