Articles in this section

Unable to create a backup of PostgreSQL database: pg_dump: aborting because of server version mismatch

kb: bug Plesk for Linux ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • The Plesk server has two PostgreSQL database servers installed, with the versions 9.2.15 and 9.5.4.
  • At least one database was created on the PostgreSQL server with version 9.5.4.
  • Attempting to create a backup in Tools & Settings > Backup Manager, the process fails with the error below:

    CONFIG_TEXT: WARNING: (postgresql object 'admin_db') Failed to execute backup database
    WARNING: (postgresql object 'admin_db') Not all the data was backed up into /var/lib/psa/dumps/domains/example.com/databases/admin_db_4 successfully. pg_dump: server version: 9.5.4; pg_dump version: 9.2.15
    pg_dump: aborting because of server version mismatch

  • As result the created backup does not include the database from PostgreSQL server with version 9.5.4.

Cause

Plesk bug with the ID PPPM-5078, which will be fixed in future updates.

Resolution

Until the bug be fixed, as workaround:

  1. Log into the server via SSH.
  2. Create a backup for the /etc/psa/psa.conf file:

    # cp -a /etc/psa/psa.conf{,.back}

  3. Edit the /etc/psa/psa.conf file to point Plesk to the new PostgreSQL database server by changing the lines below from: 

    CONFIG_TEXT: PGSQL_DATA_D /var/lib/pgsql/data
    PGSQL_CONF_D /var/lib/pgsql/data
    PGSQL_BIN_D /usr/bin

    To

    CONFIG_TEXT: PGSQL_DATA_D /var/lib/pgsql/9.5/data
    PGSQL_CONF_D /var/lib/pgsql/9.5/data
    PGSQL_BIN_D /usr/pgsql-9.5/bin

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.