PostgreSQL DBMS – /bin/sh: 1: /usr/bin/psql: not found

If during setting up of SqlBak on Linux or during a backup job one of the following errors occurs:

PostgreSQL DBMS – /bin/sh: 1: /usr/bin/psql: not found
or
PostgreSQL DBMS – /bin/sh: 1: /usr/bin/pgdump: not found

it means that SqlBak app could not find the path to postgresql executables. By default, SqlBak looks for postgresql files in the /usr/bin/psql directory. 

How to fix the issue

To resolve the issue please follow these steps:

  1. Make sure that postgresql-client is installed

    To do this, please execute:

    psql -V

    the following response should be received:
    psql (PostgreSQL) 12.1 (Ubuntu 12.1-1.pgdg18.04+1)

    If you get an error message that the command was not found, install postgresql-client via the standard package manager. For Ubuntu, use this:

    sudo apt-get install postgresql-client

  2. Find the path where postgresql is installed:
    which psql
  3. Set a path to postgresql for SqlBak:
    sudo sqlbak -us -ps <your/path/to/psql>

Leave a Reply

Your email address will not be published. Required fields are marked *