Symptoms
-
An attempt to create a database server, or domain backup with a PostgreSQL database finishes with the following or similar warning:
PLESK_WARN: Cannot run PostgreSQL client tools; make sure that they are installed: https://support.plesk.com/hc/en-us/articles/13302814628631. Unable to make database dump. Error: Unable to exec pg_dump: proc_open(): CreateProcess failed, error code: 2
-
An attempt to restore a server or domain backup with a PostgreSQL database included finishes with a similar warning:
PLESK_WARN: 'pg_restore.exe --file "backup_dbdump_2310230905.list" --list "backup_dbdump_2310230905"' is not recognized as an internal or external command, operable program or batch file.
-
Running
pg_dump
, orpg_restore
in CLI shows a similar message:PS pg_dump
pg_dump : The term 'pg_dump' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1pg_dump
'pg_dump' is not recognized as an internal or external command,
operable program or batch file.# pg_dump
-bash: pg_dump: command not found
Cause
PostgreSQL client tools are not installed or have not been added to the system PATH
variable.
Resolution
-
Connect to the server via SSH.
-
Install the corresponding package:
# apt install postgresql-client
-
Connect to the server via SSH.
-
Install the corresponding package:
# yum install postgresql
- Connect to the server via RDP.
- Download the PostgreSQL distribution from the official website.
- Run the MSI installer downloaded to install the PostgreSQL Client Tools component on the server.
- Go to Control Panel > System and Security > System > Advanced system settings > Environment Variables > System variables > and append the
PATH
environmental variable to the directory path where client tools were installed. - Restart Plesk services
Comments
0 comments
Please sign in to leave a comment.