Articles in this section

Cannot create/restore a backup of PostgreSQL database: Cannot run PostgreSQL client tools; make sure that they are installed

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, or pg_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:1

    pg_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

For Debian-based distributions (Ubuntu, Debian)
  1. Connect to the server via SSH.

  2. Install the corresponding package:

    # apt install postgresql-client

For RHEL-based distributions (CentOS, AlmaLinux, Rocky Linux, CloudLinux, RHEL)
  1. Connect to the server via SSH.

  2. Install the corresponding package:

    # yum install postgresql

For Windows
  1. Connect to the server via RDP.
  2. Download the PostgreSQL distribution from the official website.
  3. Run the MSI installer downloaded to install the PostgreSQL Client Tools component on the server.
  4. 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.
  5. Restart Plesk services
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.